-
Notifications
You must be signed in to change notification settings - Fork 53
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
scanf
doesn't support UTF-8 on Windows
#354
Comments
printf
/scanf
on Windows don't support UTF-8printf
/scanf
don't support UTF-8 on Windows
I think you need to change the codepage to utf8 (65001)
You can also do this with the windows function Here is some info on windows utf8 from |
Fixed |
printf
/scanf
don't support UTF-8 on Windowsscanf
doesn't support UTF-8 on Windows
@vtereshkov we need to be careful with Windows state, Umka may very well be embedded into an application that uses a different encoding, I think the best solution is to just bite the bullet, and use the widechar functions and convert them to UTF-8 back and forth. |
@skejeton Perhaps you're right, but the benefit-to-cost ratio is low, so I'm reluctant to do anything with it now. |
The C runtime on Windows supports UTF-8 in
printf()
, but not inscanf()
:(https://learn.microsoft.com/en-us/cpp/c-runtime-library/reference/scanf-scanf-l-wscanf-wscanf-l?view=msvc-170)
printf() example:Split from #108.
The text was updated successfully, but these errors were encountered: