C # Unicode (Japanese characters)

I will have a Japanese final soon, so to help me study, I made a program that will help me learn. But I can not get VS2008 to display any Unicode in the console. This is the sample I used to see if I can display Unicode:

    string diancai = new string(new char[]{ '\u70B9','\u83DC' });

    Console.Write(diancai[0] + " " + diancai[1]);

Exit:

    ? ?

Please, help! Thank!

+3
source share
3 answers

Go to the command line and try the command "chcp"

It should be like

C:\> chcp
็พๅœจใฎใ‚ณใƒผใƒ‰ ใƒšใƒผใ‚ธ: 932

932 is japanese, If the code page is incorrect or if your windows do not support it, it cannot display it in the console.

I can start yours in mine, its display following the characters, mine is Japanese windows.

็‚น ่œ

, GUI-

+2

Windows XP. , .

Windows XP :

1. โ†’ โ†’

2. .

3. , .

4.Push OK

5. .

"chcp" .

: 932

+1

:

1 ; System.Console.OutputEncoding Encoding, UTF8Encoding. (, Windows 9x, Unicode. ?)

2 :

0
source

Source: https://habr.com/ru/post/1725117/


All Articles