aboutsummaryrefslogtreecommitdiff
path: root/Config.in
diff options
context:
space:
mode:
authorAvi Halachmi (:avih) <avihpit@yahoo.com>2023-08-03 18:23:23 +0300
committerAvi Halachmi (:avih) <avihpit@yahoo.com>2023-08-03 20:57:53 +0300
commitbf70275f786716546ec474caade0f16ec28da541 (patch)
treec92cc94e1fd5508b6a0cc7745f40cd7750b3e160 /Config.in
parenta42cc92778545d21429f9267540330991185f1f1 (diff)
downloadbusybox-w32-bf70275f786716546ec474caade0f16ec28da541.tar.gz
busybox-w32-bf70275f786716546ec474caade0f16ec28da541.tar.bz2
busybox-w32-bf70275f786716546ec474caade0f16ec28da541.zip
win32: add FEATURE_UTF8_OUTPUT (enabled with unicode)
Previously, the unicode build required console (out) codepage of UTF8 in order for unicode output to be printed correctly - e.g. at the shell command prompt or the output of `ls` for unicode file names. This is inconvenient, because by default it's not UTF8, and so unless the user invoked 'chcp 65001' - by default unicode output didn't work. This feature (which is now enabled for the unicode build) makes it print unicode output correctly regardless of the console CP, by using a new stream-conversion funcion from UTF8 chars to wchar_t, and writing those using WriteConsoleW. If the console CP happens to be UTF8 - this conversion is disabled. We could have instead changed the console CP to UTF8, but that's a slippery slope, and some old program which expect the default CP might get broken, so achieving the same result without touching the console CP is hopefully better.
Diffstat (limited to 'Config.in')
-rw-r--r--Config.in13
1 files changed, 12 insertions, 1 deletions
diff --git a/Config.in b/Config.in
index 33f90fa42..548eaf20c 100644
--- a/Config.in
+++ b/Config.in
@@ -438,7 +438,8 @@ config FEATURE_UTF8_MANIFEST
438 depends on FEATURE_RESOURCES 438 depends on FEATURE_RESOURCES
439 help 439 help
440 Include a manifest which sets the process code page to UTF-8. 440 Include a manifest which sets the process code page to UTF-8.
441 Users who enable this may also wish to enable FEATURE_UTF8_INPUT. 441 Users who enable this may also wish to enable FEATURE_UTF8_INPUT
442 and/or FEATURE_UTF8_OUTPUT.
442 443
443config FEATURE_ICON 444config FEATURE_ICON
444 bool "Include application icon in binary" 445 bool "Include application icon in binary"
@@ -483,6 +484,16 @@ config FEATURE_UTF8_INPUT
483 This may be useful in conjunction with the UTF8 manifest which 484 This may be useful in conjunction with the UTF8 manifest which
484 is supported in Window 10 and 11. 485 is supported in Window 10 and 11.
485 486
487config FEATURE_UTF8_OUTPUT
488 bool "Allow UTF8 console output"
489 default n
490 depends on PLATFORM_MINGW32 && FEATURE_UTF8_MANIFEST
491 help
492 Print UTF8 output correctly even if the console (output) codepage
493 is not UTF8.
494 This may be useful in conjunction with the UTF8 manifest which
495 is supported in Window 10 and 11.
496
486config TERMINAL_MODE 497config TERMINAL_MODE
487 int "Default setting for terminal mode" 498 int "Default setting for terminal mode"
488 default 5 499 default 5