-
Notifications
You must be signed in to change notification settings - Fork 172
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mixed narrow and wide-char output only produce first used. #1424
Comments
Thanks for your bug report. |
It looks like it is realated to mistake in use of "stream orientation" feature. |
it looks like the C standard doesn't specify behaviour for such situation, also it is not specified as undefined behaviour. |
Comparison:
|
For US ASCII or Latin-1 character set it is possible for most of characters because value of single-byte and UNICODE characters are same, but for other character sets it is not true and it can result in some crashes etc. |
When mixed ansi/narrow and wide-char clib output primitives are used under OWC only the first interface produces output compared to both for MSVC built application.
Understand this may be undefined behavior, yet target (win32/64) consistently should be considered. CRT Unicode stream I/O
Examples:
When built with OWC only
"hello world\n"
shall be produced, whereas both"hello world\n"
and"whello world\n"
are produced under MSVC.When built with OWC only
"whello world\n"
only shall be produced, whereas both"whello world\n"
and"hello world\n"
are produced under MSVC.The text was updated successfully, but these errors were encountered: