diff options
author | Avi Halachmi (:avih) <avihpit@yahoo.com> | 2023-08-03 19:19:47 +0300 |
---|---|---|
committer | Avi Halachmi (:avih) <avihpit@yahoo.com> | 2023-08-03 21:09:01 +0300 |
commit | b8fff6b345d4b7e3f16227f65eecca1a0c88ab41 (patch) | |
tree | dd8ea10581be75ddee328aeb6aff88f02e9542f6 /arch | |
parent | bf70275f786716546ec474caade0f16ec28da541 (diff) | |
download | busybox-w32-b8fff6b345d4b7e3f16227f65eecca1a0c88ab41.tar.gz busybox-w32-b8fff6b345d4b7e3f16227f65eecca1a0c88ab41.tar.bz2 busybox-w32-b8fff6b345d4b7e3f16227f65eecca1a0c88ab41.zip |
win32: disable console output conversion with LC_ALL=C
Previously, when writing to the console, the non-unicode build always
assumed the source data is in the ANSI codepage, and used charToCon
to convert it unconditionally to the console CP.
Similarly, the unicode build made the same assumption (where ANSI CP
is UTF8), and always tried to convert it so that it's printed
correctly (at least when FEATURE_UTF8_OUTPUT is enabled - which it is
by default at the unicode build).
However, there could be cases where this assumption is incorrect, for
instance if the data comes from a file encoded for some codepage X,
and after the user also changed the console CP to X does 'cat file.X'
This commit allows disabling this conversion, using the same env vars
which can be used to disable the locale/unicode elsewhere, (LANG,
LC_CTYPE, LC_ALL as "C") e.g. 'LC_ALL=C cat file.X' now doesn't
convert, and the console renders it according to its own codepage.
Diffstat (limited to 'arch')
0 files changed, 0 insertions, 0 deletions