golang.org: Bad display of chinese&japanese characters on Windows?

179 views
Skip to first unread message

josvazg

unread,
Mar 29, 2012, 3:29:24 AM3/29/12
to golan...@googlegroups.com
I am installing Go 1 in all my home and work boxes without any problems so far (Mac, Ubuntu and Windows XP).

But I noticed that on Windows XP Pro the main golang.org page's chinese and japanese characters are not properly displayed: you get squares instead on golang playground and on Andrew's video title.

The page seems to be in proper UTF-8 (otherwise Rob Pike will probably kill someone, I guess...) and I can type some other NON ASCII characters like my beloved Ñ for "España" or the € symbol, so it seems a Operating System font problem.

Is this a Windows problem? Just an XP problem? or is it just me?
If the problem is not mine only...
Is there maybe another font that can be used on go playground that covers the full UTF-8 character range and can be used instead?

(I believe it is important to give a good first impression to newcomers from all platforms, or at least all supported platforms)
This happens on Firefox, IE and Chrome, so the system font problem seems to be the right hypothesis.


Jingcheng Zhang

unread,
Mar 29, 2012, 4:00:33 AM3/29/12
to josvazg, golan...@googlegroups.com
People who doesn't install fonts for east asian languages will see some square boxes.
The English version of XP by default doesn't install these fonts.
--
Best regards,
Jingcheng Zhang
Beijing, P.R.China

josvazg

unread,
Mar 29, 2012, 4:31:53 AM3/29/12
to golan...@googlegroups.com, josvazg
Maybe a workaround would be to change the hello world source code JUST for some affected Windows platforms so that instead of Chinese the UTF-8 demo hello is cyrillic or greek which seems to display just fine in these platforms?

I tested it on:
My system is a Windows XP Pro Spanish.

[My Ubuntu box seems to have no problems with chinese or japanese, but it also has problems with tibetan, burmese, mongolian, etc]

mattn

unread,
Mar 29, 2012, 4:34:55 AM3/29/12
to golan...@googlegroups.com, josvazg
I don't think that golang.org display bad.


I use google chrome dev channel on Windows XP.

josvazg

unread,
Mar 29, 2012, 6:51:39 AM3/29/12
to golan...@googlegroups.com, josvazg
Maybe you happen to have the proper fonts. 
I attach my screen on Chrome, but happens on Firefox an IE too.

Is just me then?
Pantallazo.PNG

mattn

unread,
Mar 29, 2012, 7:05:04 AM3/29/12
to golan...@googlegroups.com, josvazg
Ah, do you mean the text in goplay? This is japanese text meaning "world". So If you don't have font which contains japanese glyphs, you'll get the result.

Rob 'Commander' Pike

unread,
Mar 29, 2012, 7:56:05 AM3/29/12
to mattn, golan...@googlegroups.com, josvazg
On Thu, Mar 29, 2012 at 10:05 PM, mattn <matt...@gmail.com> wrote:
> Ah, do you mean the text in goplay? This is japanese text meaning "world".
> So If you don't have font which contains japanese glyphs, you'll get the
> result.

I'd like to understand this better. The Japanese text is 世界, which is
6 bytes of UTF-8-encoded characters. I am curious how they turn into
so may -- 16 is it? -- bytes on this system. I don't doubt your
conclusion, I just don't understand the process. But anything is
possible when char encodings go rogue.

-rob

josvazg

unread,
Mar 29, 2012, 8:27:57 AM3/29/12
to golan...@googlegroups.com, mattn, josvazg
Maybe I am misunderstanding something myself but:
- I thought 世界 was Chinese. is it Japanese then?
- If you are wondering why the TWO glyphs turn into so many characters in MY picture it is because I edited the default hello world example.

Originally there was only two squares, one for each chinese glyph, then I added the upper and lowercase Ñ and some cyrillic text I got from a website to show that it worked with some UTF-8 glyphs but not others.

josvazg

unread,
Mar 29, 2012, 8:29:07 AM3/29/12
to golan...@googlegroups.com, mattn, josvazg
Sorry...there was only two squares, one for each JAPANESE glyph...
I meant

Robert Bloomquist

unread,
Mar 29, 2012, 1:23:26 PM3/29/12
to golan...@googlegroups.com, mattn, josvazg
On Thursday, March 29, 2012 8:27:57 AM UTC-4, josvazg wrote:
Maybe I am misunderstanding something myself but:
- I thought 世界 was Chinese. is it Japanese then?
 
It's Japanese kanji, which is a writing system taken from China.  The Chinese characters for "world" are the same, but I believe the use here is a reference to the original UTF-8 paper titled, "Hello World or Καλημέρα κόσμε or こんにちは 世界"; in this case, the use of hiragana indicates that the language is in fact Japanese.
Reply all
Reply to author
Forward
0 new messages