Email

Special Thanks to James Dew, Helmer Aslaksen, C. P. Sobelman, and Phyllis Zhang
Email

Many students and instructors of the Chinese language have a need to display pinyin with tone marks in their documents. A number of fonts have been created for PC and Macintosh which allow the easy input of pinyin (for example, Easytone by James Dew). I developed a Macintosh application to convert documents between many of these fonts called Pinyin Font Converter. With the growth of Unicode's popularity and the ease with which users can now display unicode, especially in their browsers, many of us want to produce pinyin with tones in unicode.

This page performs a simple function. It converts text written in pinyin, with syllable-final tone numbers, into unicode. The result is displayed both as plain unicode text and as the HTML code necessary to display the unicode in a web page. Simply enter or paste in the pinyin and convert.

 

 
Text to Convert: (For example: zhong1guo2 shi4 shi4jie4 zui4 hao3 de guo2jia1, use v0 for ü or v1-4 for ü with tones)
   
   
  
     
   
 
 


Thanks to Helmer Aslaksen's excellent page on Pinyin and Unicode for giving me the codes necessary to make this script. Thanks to James Dew for the Word macro which conveniently listed the order for conversion from which I built both the Pinyin Font Converter and this PHP script. The conversion script itself is free to download, modify, and redistribute under the provisions of the open source license. Please email your modified script to me so I may incorporate any improvements.

What if the tones don't display correctly?

You may not have configured your browser to display unicode fonts correctly, or you may not have unicode fonts installed on your system. See Helmer Aslaksen's web site for information on how to remedy these problems.

This utility is free. If you find it useful and wish to support further development of the project and the hosting of this and other projects at this site, please consider making a donation.

News and Changes

June 2, 2003 - Sebastien Bruggeman has incorporated the code from this conversion script into a project he is working on for the search of the CEDICT dictionary. He modified it to work with u:1, u:2, etc. for ü. He also has a new webboard for Chinese and Chinese language computing available on his Huanying Guanglin site. He has also assembled an array of reference information on Chinese computing at his Chinese Language Processing page.

June 1, 2003 - Special thanks to Bernard Dumigron for pointing out that the script doesn't have a way to handle ü without any tones. Thanks to this and his specific suggestion for a solution, I have added support for this using v0.

 
     
 
Last Updated: June 2, 2003