Getting cnchess to properly display Chinese characters

For those of you knowing how to play Chinese chess there is a Chinese application (Qt based) which is installed by default in Red Flag Linux and works very well in Chinese, but which unfortunately doesn’t install so well in other distributions. A quick Google search will give you a place to find both the binaries and the source code and even the developer’s contact details, however they both have been made on a platform using ‘Western ISO-8859-15’ GB-18030 encoding and will not display Chinese characters probably (you’ll get garbage) on your modern UTF-8 distribution. I guess the developer might be using Windows (or an old distro?) and one of the advantages of the Qt framework is cross platform development. So now one way to fix this problem could be to convert the source files to UTF-8 and recompile or repackage. Encoding conversion can be done using the iconv command and a bash script: (thanks worufu)
#!/bin/bash
for file in `ls`
do
iconv -f ISO-8859-15 -t UTF-8 -o "new_$file" "$file"
iconv -f GB18030 -t UTF-8 -o "new_$file" "$file"
done

Compiling requires you to read the README file shipped with the source code and use the make and configure tools.

Another way is to look for the Red Flag Linux rpm (thank you again Google) which latest version is available on Red Flag Linux FTP and install it. Should you use a Debian based distribution there is a existing deb package on Ubuntu China forum which suffers from the same problem, so your best bet is to convert the already fetched rpm package to a debian one using Alien, and you’re done (still need to install it though). I’ve uploaded the final working (in Chinese) debian package right here to save the hassles to others. For MIPS computers users such as the Gdium, I’ll upload the rpm once it’s done to our community repository soon.

Open Source Open World China, 2009

Spent the first 2 days of the week at Open Source Open World, 2009 which is one of THE Open Source conferences in China to attend and had the chance to listen to Jim Zemlin, Mark Shuttleworth and Louis Suarez-Potts. In fact it was also the opportunity to meet other Open Source people from organizations like Red Hat, Nokia or deviceVM as well as the usual Chinese companies attending those events. I think the major happening from my perspective was the round table discussion on the second day which put together all those industry players as well as the banking industry. Apparently COPU is going to push for better online banking support under Linux as well as a Linux port of the Chinese compulsory official accounting software in Haidian district to start with. Great to see open discussions leading to decisions and actions!