Re: How to display a SVG with Chinese text element on mobile phone?

Hi wangkaiyu,

> Is the file in the correct encoding? If it's not then the Chinese characters
> are likely to show up wrong

Taking Robin's suggestion, I'm attaching a file, based on yours, with
the proper XML namespace declaration and the UTF-8 encoding hint. I've
quickly tested and seems to work as expected in Firefox 3.0.7, Opera
9.64 and Safari 4 (Public beta). ASV 6 (Developer release) only seems
to work if a font with Unicode support is specified (see suggestion
below and/or attachment).

Also, Robin's suggestion of using a SVG font would surely help. If
implementation supports it, I'd suggest that as the best idea. If not,
other things which may be happening (and possible workarounds):
 * Cause: parser may not be compatible with non-ANSI characters
(although the rendering engine may). Workaround: use XML notation [1]
("ሴ") for non-ASCII characters;
 * Cause: default font doesn't support Unicode characters. Workaround:
find a font which does and use the "font-family" [2] to force its
usage (the file attached makes use of this). Note that this is pretty
tied to a particular set of devices, as available font names will
vary.

If the suggestions don't put you in the right track, please consider
providing more information. You may also try SVG Developers group [3]
instead, as it's a lot more aimed at general SVG support and questions
then this mailing list. ;-)

Hope this helps,
 Helder Magalhães

[1] http://www.w3.org/TR/unicode-xml/#Notation
[2] http://www.w3.org/TR/SVG11/text.html#FontFamilyProperty
[3] http://tech.groups.yahoo.com/group/svg-developers/

Received on Monday, 16 March 2009 13:51:24 UTC