So, I'm trying to write Japanese characters to my terminal using C and wide characters.
The question is what happened to what I'm doing so that I can fix it, what other reservations should I expect when using wide characters and do you have any comments on what I'm trying to do?
Bad code:
#include <stdio.h>
#include <wchar.h>
int main( ) {
wprintf(L"%c\n", L"\x3074");
}
This does not work, but I want to know why.
the problem only gets worse when I try to use wchar_t to store the value:
wchar_t pi_0 = 0x3074;
wchar_t pi_1 = "\x3074";
wchar_t pi_2 = L"\x3074";
Therefore, I would also like to do this work, since I plan to have data structures by holding lines of these characters.
Thank!
source
share