thpatch / win32_utf8

Transparent UTF-8 support for native Win32 ANSI applications
The Unlicense
98 stars 7 forks source link

CRT functions like `printf` #2

Open be5invis opened 7 years ago

be5invis commented 7 years ago

MSVCRT functions are separated into ANSI and UNICODE either.

DankRank commented 7 years ago

This would be quite difficult to implement. Not only there are about 100 printf variations, there are also many different versions of crt. Also this won't work with statically linked crt for obvious reasons.

be5invis commented 7 years ago

Wait... This project is not a library for writing new programs?

Amaroq-Clearwater commented 4 years ago

@be5invis It's for modifying existing programs.

32th-System commented 4 years ago

It's for both modifying existing programs and writing new ones. thcrap's components delibarately choose to use win32_utf8 internally while thcrap itself will inject it into other programs aka make other programs use win32_utf8 against their will

WCIofQMandRA commented 3 years ago

On Windows 10, you can call setlocale(LC_ALL, ".UTF8") at the beginning of main() to make almost every CRT functions use UTF-8. See here.

32th-System commented 3 years ago

However, we support older Windows, going back all the way to XP

Amaroq-Clearwater commented 3 months ago

I know a few developers whom are targeting platforms like Wine and ReactOS, so adding support for these functions might be helpful to them.