### 19.1 Unicode Support on Windows ¶

Microsoft Windows supports UTF-8 in console applications running in Windows Terminal but not in applications running in the older Windows Console Host. In Windows Terminal, the code page must be set to 65001 for UTF-8 to be enabled. With the UTF-8 code page, running `units -V` might show

    GNU Units version 2.24
    Without readline, with UTF-8, locale English_United States (en_US)

Two values are shown for the locale: the first is the one returned by the system; the second is the POSIX value to which the system value is mapped.

With a different code page, the result might be

    GNU Units version 2.24
    Without readline, with UTF-8 (disabled), locale English_United States (en_US)
    To enable UTF-8: set code page to 65001

If `units` is running in Windows Console Host, regardless of the code page, the result might be

    GNU Units version 2.24
    Without readline, with UTF-8 (disabled), locale English_United States (en_US)
    To enable UTF-8: run in Windows Terminal and set code page to 65001

The UTF-8 code page can be set by running `chcp 65001`.

As of late 2024, the Windows build of `units` does not identify characters—typically East Asian—that occupy more than one column, and error messages involving those characters may not be properly aligned.