Chinese Computing Newsletter; July, 2002 ======================================== CONTENTS ======== * Chinese PalmOS under Development * Perl 5.8.0 Released with Improved Unicode Support * Taiwan to Start National Plan to Push Free Software * Oracle Opens Chinese Development Website * Chinese on Linux Discussion at Slashdot * Site of the Month: Traveler's Companion Chinese for PocketPC * Code Sample of the Month: Handling Chinese with Perl 5.8 ARTICLES ======== ** Chinese PalmOS under Development PalmSource, the developer and licenser of the Palm OS, announced in June that it is developing a version of the OS with native support for Chinese. Details of this new version were not available and it is not clear how it will differ from Chinese versions of the PalmOS already offered by Acer. - Related Links http://news.com.com/2100-1040-934470.html http://www.palmos.com/about/news/2001/060101.html http://www.yale.edu/chinesemac/pages/palmOS.html ** Perl 5.8.0 Released with Improved Unicode Support Previous versions of Perl have had limited and bugging Unicode support. With the release of Perl 5.8.0, Unicode support has greatly improved. "use utf8" is no longer needed except when the script itself is in UTF-8. Programs can be written in legacy encodings. Unicode in regular expressions should now work. File IO in other encodings is also now supported without additional libraries. A file in GB2312 or Big5 can be read in and converted to Unicode seamlessly. Perl also now uses Unicode 3.2.0. - Related Links http://dev.perl.org/perl5/news/2002/07/18/580ann/perldelta.html#unicode%20overhaul http://dev.perl.org/perl5/news/2002/07/18/580ann/ http://www.perldoc.com/perl5.7.3/pod/perluniintro.html http://www.perldoc.com/perl5.7.3/pod/perlunicode.html ** Taiwan to Start National Plan to Push Free Software According to a report by the Central News Agency, the government of Taiwan will start a program to encourage the development of a free Chinese software environment. As summarized by Andy Tai in the kuro5shin report: "Due to high Microsoft license fees (as previously covered here in Kuro5hin) and also to improve the levels of software technology in Taiwan, this plan includes the creation of a totally Chinese free software environment for Taiwan users, free software application development, and training of 120,000 people for free software skills, as well as efforts at schools to provide diverse information technology environments to ensure the freedom of information." Related Links http://www.kuro5hin.org/story/2002/6/3/55433/41738 ** Oracle Opens Chinese Development Website With China becoming its fastest growing market, Oracle has created a Chinese-language version of its Oracle Technology Network. This new website "aims to provide free downloads of Oracle development tools and software, technology documentation and support services to developers in the country. Within OTN is a forum for information sharing among developers and a marketplace for job seekers." (from CNET article below) Related Links http://otn.oracle.com/global/cn/content.html http://zdnet.com.com/2100-11-935324.html ** Chinese on Linux Discussion at Slashdot Users and developers interested in Chinese on Linux can read a recent interesting discussion on the topic on the news website Slashdot. Many people talk about their experiences with different programs and Chinese environments for Linux. Related Links http://ask.slashdot.org/askslashdot/02/07/06/1850205.shtml?tid=106 http://www.ibiblio.org/mdw/HOWTO/Chinese-HOWTO.html ** Site of the Month: Traveler's Companion Chinese for PocketPC PocketPC owners traveling to China might be interested in a new language assistance program called "Traveler's Companion Chinese" from EasyTap Software. Among the included features is the ability to "build" phrases, allowing flexibility not available in a paper phrase book. Special forms allow you to create complex phrases through simple menu selections. Simplified, Traditional and pinyin display are all supported. Related Links http://www.easytap.net/tcc.html ** Code Sample of the Month: Handling Chinese with Perl 5.8 The following code sample exhibits some of the basic ways you can use perl with Chinese to load files and in regular expressions. It loads a GB-encoded file, looks at each character to see if it a Chinese character or not, then prints the character and if it is or isn't Chinese. It prints the results out using UTF-8. #!/usr/local/bin/perl # Load a GB-encoded file and convert to Unicode internally # :encoding(euc-cn) specifies the encoding. # Other possible encodings include gbk, hz, big5, big5-eten, # big5-hkscs. Available separately are big5plus, cccii, euc-tw open(GB, "< :encoding(euc-cn)", "gbfile.txt") or die $!; # Set STDOUT to print using UTF-8 binmode(STDOUT, ":utf8"); while ($line = ) { for ($i = 0; $i < length($line); $i++) { # substr is "unicode-aware" $char = substr($line, $i, 1), "\t"; # \p allows a variety of properties to be checked # Here it will match a Han character if ($char =~ m/\p{Han}/) { print "$char is a Han character\n"; } else { print "$char is NOT a Han character\n"; } } } -------------------------------------------------------------------- Please send suggestions for future Chinese Computing Newsletter items to erik@chinesecomputing.com. Submissions are appreciated and will be credited in the newsletter. Past issues of the newsletter can be accessed through the www.chinesecomputing.com site. Feel free to redistribute the newsletter for non-commercial use as long as you retain this notice. To remove yourself from the list, send an e-mail to newsletter@chinesecomputing.com. On the subject line write "remove your@email-address.com". If you received the newsletter through the CCNet Chinese Computing mailing list, you must unsubscribe from that list.