Skip to content
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

CRT functions like printf #2

Open
be5invis opened this issue May 26, 2017 · 7 comments
Open

CRT functions like printf #2

be5invis opened this issue May 26, 2017 · 7 comments

Comments

@be5invis
Copy link

MSVCRT functions are separated into ANSI and UNICODE either.

@DankRank
Copy link
Member

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
Copy link
Author

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

@Amaroq-Clearwater
Copy link

@be5invis It's for modifying existing programs.

@32th-System
Copy link
Member

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

@u8cat
Copy link

u8cat commented Aug 19, 2021

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
Copy link
Member

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

@Amaroq-Clearwater
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants