The Artima Developer Community
Sponsored Link

Python Buzz Forum
Chinese Text Display

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Ng Pheng Siong

Posts: 410
Nickname: ngps
Registered: Apr, 2004

Ng Pheng Siong is just another guy with a website.
Chinese Text Display Posted: Dec 26, 2004 10:58 AM
Reply to this message Reply

This post originated from an RSS feed registered with Python Buzz by Ng Pheng Siong.
Original Post: Chinese Text Display
Feed Title: (render-blog Ng Pheng Siong)
Feed URL: http://sandbox.rulemaker.net/ngps/rdf10_xml
Feed Description: Just another this here thing blog.
Latest Python Buzz Posts
Latest Python Buzz Posts by Ng Pheng Siong
Latest Posts From (render-blog Ng Pheng Siong)

Advertisement

My Firefox installation displays the Chinese text on this blog in a rather ugly Sungti font where the characters are not of uniform size.

The pages of the Chinese Zope User Group and Zope@Taiwan, in UTF-8, come up in a much nicer Mingti font, the former in simplified Chinese and the former in traditional Chinese. (Different script, same language. I read both.)

Following links from the above two sites, I see that some Chinese pages come up in the nice font and others in the ugly one. The difference appears to be due to the HTML; here's Zope@Taiwan's:

<html xmlns="http://www.w3.org/1999/xhtml" 
  xml:lang="zh-tw" lang="zh-tw">

When the "lang" attribute (or element, whatever) is set to "zh-tw", "zh-cn", or just "zh", the page is rendered using the nice font. When it isn't, as with my page, it comes up with the ugly font.

Let's try this... <goes off to fix up my existing blog entries...> Yes! Now it displays in the nice font. It comes up in simplified Chinese.

Next experiment, change one paragraph to "zh-tw"... Nope, still simplified Chinese. Hmmm, I had imagined that there is exactly one encoding for any particular Chinese character, and how said character is displayed - simplified or traditional - depends on some system language setting. Forgetting about computers for a moment, I suppose this is because, to me, these are just two scripts for writing the same language. I see I'm wrong.

Ah, this page explains it: "GB [...] has a set of about 7,000 simplified Chinese characters. Big5 [...] has about 13,000 traditional Chinese characters. [...] Unicode includes all the characters from GB and Big5 and more."

Read: Chinese Text Display

Topic: Adding Optional Static Typing to Python Previous Topic   Next Topic Topic: PSF Grant status?

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use