Yunnan is China's most beautiful province and YunnanExplorer gives you information you need to explore this exciting region.

Questions, comments, feedback please email me.

Yunnan Map
Random Image from YunnanLM Brinckmann at Alamy

Chinese Converter

This application converts text written in Chinese to HTML, with the Chinese text annotated by Pinyin and English translation. This is not a text editor, but a command line app that makes your Chinese text more readable. The state of the code is experimental.

What the hell was this Chinese character? If you are studying Chinese, this is probably one of the most asked questions. Sometimes it would just be nice if it was possible to put the pinyin and maybe even a translation right below a Chinese character, just the way beginners' textbooks are designed.

This is just what this application does. It takes a text written in Chinese (with maybe some words of English in between) and reformats the text so that under every Chinese character there is the pinyin (complete with tone-marks) and a translation. Your input file, which must be saved with the UTF-8 encoding, will be left untouched and a new file in a simple HTML format will be created. You can then view this file in any web-browser.

Chinese Converter Python Source Distribution

If you are running Python (>= 2.5) on your machine, you can install the Chinese converter from source. The zip-file you can download below contains the usual distutils installer, so just install with

python setup.py install

You should get two command line applications, cc_txt2tex and cc_txt2html, which both take one argument, the file with the text to be translated. This file must be a text file in UTF-8 encoding, otherwise the application will fail ungracefully.

cc_txt2tex mytext.txt

The only difference is that cc_txt2tex produces latex output (which you can translate with pdflatex into a PDF document) and cc_txt2html produces html output, which you can directly view with a browser. The output is in a file with the same name as the input, but the .tex or .html extension.

Download file now.

Windows Version

The link below allows you to download setup.exe, a standard Windows installer, that will install the application Chinese2Html with all required files onto your computer.

You will have then a command line application called Chinese2Html in your chosen installation folder. This must be run from the command line window (CMD) with the file name of the text to translated as the only argument. The file to be translated must be a text file, encoded in UTF-8. (If you type Chinese characters into your text, your text editor should ask you which encoding to use, select UTF-8). Do not save your text as a word document, as this contains many additional formatting characters that cannot be translated.

The output of the application is a file with the same name as your text file, but the .html extension. It can be viewed in your web-browser.

Download file now.