printf("%s\n", "ああ");
It outputs :
ã‚ã‚
What else should I do to print it correctly?
Assuming that's unicode, compile with a C99 compiler
#include <locale.h>
#include <stdio.h>
#include <wchar.h>
int main(void) {
wchar_t buff[3]; // = L"ああ";
buff[0] = buff[1] = L'\U00003042';
buff[2] = 0;
setlocale(LC_ALL, "");
wprintf(L"%ls\n", buff);
return 0;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With