-
Notifications
You must be signed in to change notification settings - Fork 163
Windows Unicode #210
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
base: main
Are you sure you want to change the base?
Windows Unicode #210
Conversation
Allow other processes to read from or delete the same file while we have it currently opened for reading. Allow current process to open file for reading while other processes have this file already opened for reading and are sharing this file for reading.
77aca69 to
43cb601
Compare
|
I recommend changing those for the correct ones, as i explained at #202 (comment) to avoid any problem if we ever use something from those headers in the future # define _WINUSER_ // -> NOUSER
# define _WINGDI_ // -> NOGDI
# define _IMM_ // -> NOIME
# define _WINCON_ // -> NOAPISET i believe, but need to #include <stringapiset.h> manually |
|
I feel that using the wide variant for file api is necessary (for longer names), but libc console output functions should be fine with |
I agree. Can we do this instead of all that |
Should be in separate change set.
How should I do this? Currently, Next. This changes global state. Meaning state that remains after program exit. The console lives after program execution ends, affecting any and all other programs executed after
Yes, it is disaster. But Or, changing the state once at program startup, and changing it back just before program exit. But. Because I have no idea where to call the |
|
The user can change the log handler themselves, I think it's more flexible that way |
Every Windows API interaction is wrapped with UTF-8 -> UTF-16 conversion. Meaning both nob and nob user code can stay UTF-8. Also every result from Windows API is wrapped with UTF-16 -> UTF-8 conversion.
If nob user wishes to use printf-style output, they need to use nob_log instead. Or detect Windows and do the conversion themselves (I'm not changing nob public API, and printf is not part of nob API).