mirror of https://github.com/flysand7/ciabatta.git
Add UTF-8 codepage support
This commit is contained in:
parent
02c0040989
commit
b90d7119d4
|
@ -4,3 +4,6 @@
|
|||
[submodule "fdec64"]
|
||||
path = src/fdec64
|
||||
url = https://github.com/bumbread/fdec64.git
|
||||
[submodule "src/libwinsane"]
|
||||
path = src/libwinsane
|
||||
url = https://github.com/flysand7/libwinsane.git
|
||||
|
|
|
@ -1 +1 @@
|
|||
clang test\test_%test%.c -Iinc -g -lkernel32 -lDbghelp -lciabatta.lib
|
||||
clang test\test_%test%.c src\libwinsane\libwinsane.obj -Iinc -g -lkernel32 -lDbghelp -lciabatta.lib
|
|
@ -123,6 +123,9 @@ void _setup_io() {
|
|||
stdin->buffer = (stream_buffer_t){1, _IOLBF, BUFSIZ, in_buf};
|
||||
stdout->buffer = (stream_buffer_t){1, _IOLBF, BUFSIZ, out_buf};
|
||||
stderr->buffer = (stream_buffer_t){1, _IONBF, 0, NULL};
|
||||
|
||||
SetConsoleCP(CP_UTF8); // maybe will work someday
|
||||
SetConsoleOutputCP(CP_UTF8);
|
||||
}
|
||||
|
||||
int win_parse_mode(
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
Subproject commit c22973570de5d75eff0f03a823536e781ebdac4c
|
|
@ -1,10 +0,0 @@
|
|||
|
||||
#include <stdio.h>
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
for(int i = 0; i != argc; ++i) {
|
||||
char *arg = argv[i];
|
||||
printf("% 2d: %s\n", i, arg);
|
||||
}
|
||||
return 0;
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
|
||||
#include <stdio.h>
|
||||
#include <Windows.h>
|
||||
|
||||
#pragma comment(lib, "user32.lib")
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
// Print args:
|
||||
printf("Arguments:\n");
|
||||
for(int i = 0; i != argc; ++i) {
|
||||
char *arg = argv[i];
|
||||
printf(" %s\n", arg);
|
||||
}
|
||||
// Test UTF-8 support:
|
||||
printf(u8"Привет, мир!\n");
|
||||
printf(u8"こんにちくわ世界!\n");
|
||||
// Try UTF-8 in winapi (doesn't use UTF-8 without manifest)
|
||||
MessageBoxA(NULL, u8"Успех", u8"Ошибка", MB_OK);
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue