PDA

View Full Version : My unsuccessful attempt to display Chinese


metaprgmr
10-25-2004, 09:19 AM
Ok, this is what I did to display a Chinese character, using LPS-2.2. First of all, I copied simsun.ttf into the lps/fonts/ directory.

I ran a test lzx file like this:
<?xml version="1.0" encoding="UTF-8"?>
...
<font name="chinese" src="simsun.ttf"/>
<text font="chinese">中</text>
...


I also created a "labels.xml" data file:
<?xml version="1.0" encoding="UTF-8"?>
<texts>
<signon>中</signon>
</texts>

then use it:
<dataset name="labels" src="labels.xml"/>
<view datapath="labels:/texts">
<text font="chinese" datapath="signon/text()"/>
</view>


Both experiments failed to display that Chinese character. Interestingly, however, they show the "Chinese character" in different ways (different weird symboles.)

Any advice?

-James

d~l
10-27-2004, 12:07 AM
this thread (http://www.laszlosystems.com/developers/community/forums/showthread.php?threadid=459&highlight=i18n) suggests that Unicode is not yet supported ..

As an interim solution, you could render Chinese characters in embedded SVG objects .. although users with Internet Explorer browsers will need the SVG plug-in, Mozilla has a built-in SVG reader.

There are unicode font definitions (including Chinese .. ) in SVG.

antun
11-05-2004, 08:55 AM
Unicode support is coming soon. The roadmap is at:

http://www.openlaszlo.org/development/roadmap/

-Antun