#include <stdio.h>
#include <stdlib.h>
#include <locale.h>
int main (void)
{
setlocale(LC_ALL, "ja_JP.Shift_JIS");
char Str[3] = {0x82,0xCC,'\0'};
printf ("(%ls)\n", Str); // --> A
wprintf (L"(%ls) \n", Str); // --> B
system ("pause");
}
Note : の = (Shift-JIS) 0x82 0xCC
It printed out so weird: (JUST THREE CHARACTERS and \n was totally ignored!!)
(()
Why can neither A nor B print out the character encoded in Shift-JIS?