win32_utf8 icon indicating copy to clipboard operation
win32_utf8 copied to clipboard

CRT functions like `printf`

Open be5invis opened this issue 7 years ago • 6 comments

MSVCRT functions are separated into ANSI and UNICODE either.

be5invis avatar May 26 '17 06:05 be5invis

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.

DankRank avatar May 28 '17 13:05 DankRank

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

be5invis avatar May 28 '17 17:05 be5invis

@be5invis It's for modifying existing programs.

Amaroq-Clearwater avatar Apr 24 '20 17:04 Amaroq-Clearwater

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

32th-System avatar Apr 24 '20 18:04 32th-System

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.

WCIofQMandRA avatar Aug 19 '21 10:08 WCIofQMandRA

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

32th-System avatar Aug 19 '21 12:08 32th-System