chcp 65001
clears and resizes the window, which is encouraging. But when I
attempt to display some simple kanji encoded in UTF-8 with
type filename (it contains the 3 kanji for 'nihongo')
I just get three 'missing glyph' boxes.
I know that the glyphs are present since I have my machine set to use
Japanese /SJIS for non Unicode programs. In the command box chcp shows
me that I have 932 and displaying a file with the same three
characters in SJIS displays correctly.
Can I rectify this?
Tim
--
Mihai Nita [Microsoft MVP, Visual C++]
http://www.mihai-nita.net
------------------------------------------
Replace _year_ with _ to get the real email
So why does it display correctly when leaving the code page as 932 and
displaying the dame data in 932? Is it missing the UTF-8 CMAP?
I discovered that PC's sold in Japan can change the font to MSGothic,
which does display the UTF-8 correctly.
Tim
Tim
Because it is "magically" replaced by MS Gothic.
Just take a look here (and look for a key called "932"):
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows
NT\CurrentVersion\Console\TrueTypeFont
Thanks for your answers Mihai - I do have some more related questions.
- Can I change the console font to one that does have glyphs for some
reasonable selection of Unicode - the primary CJK rage for example?
- I experimented with that registry setting. Changing the entry for 0
- to MS Gothic, then to Lucida Sans Unicode - resulted in no TT font
showing in the font selection box for command prompt
- Also tried adding a registry key called 65001 mapped to the above wo
in the hope that it would 'magically' change to that font, but to no
avail.
Tim
There is a trick that allows you for more than one font:
http://www.hanselman.com/blog/UsingConsolasAsTheWindowsConsoleFont.aspx
But the fonts you can use have to pass very strict requirements:
http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q247815
None of the fonts you tried passes the test.
But Consolas has a better Unicode coverage than Lucida.
And Code2000 also works (shareware, 5$, worth it)
http://www.code2000.net/code2000_page.htm
> - Also tried adding a registry key called 65001 mapped to the above wo
> in the hope that it would 'magically' change to that font, but to no
> avail.
65001 will not work. Only OEM code pages are ok.
I have it working with Consolas, but not Code2000. Unfortunately
Consolas also does not have the Kanji fonts.
Do you have Code2000 installed as a console prompt font?
- Tim
I had it once, if memory does not fail me.
But I did not quite like it, and I don't remember being able to see the Kanji