https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=16649

--- Comment #11 from Guy Harris <ghar...@sonic.net> ---
(In reply to Guy Harris from comment #10)
> * if the "textmode" is either __crt_lowio_text_mode::utf16le or
> __crt_lowio_text_mode::utf8, the buffer appears to be treated as UTF-16LE in
> *either* case, no translation is done, and WriteConsoleW() is used (as
> noted, this is console-specific).

Those get set for descriptors open with _O_U16TEXT and _O_U8TEXT, respectively.

The documentation for _setmode():

   
https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/setmode?view=vs-2019

says:

    You can also pass _O_U16TEXT, _O_U8TEXT, or _O_WTEXT to enable Unicode
mode, as demonstrated in the second example later in this document.

and then warns:

    Unicode mode is for wide print functions (for example, wprintf) and is not
supported for narrow print functions. Use of a narrow print function on a
Unicode mode stream triggers an assert.

So there still does not appear to be a way to force the narrow-character output
functions to accept, and generate, UTF-8 text regardless of the system code
page or the console code page.

-- 
You are receiving this mail because:
You are watching all bug changes.
___________________________________________________________________________
Sent via:    Wireshark-bugs mailing list <wireshark-bugs@wireshark.org>
Archives:    https://www.wireshark.org/lists/wireshark-bugs
Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-bugs
             mailto:wireshark-bugs-requ...@wireshark.org?subject=unsubscribe

Reply via email to