Kevin,

There are a number of things you need to do to get Chinese (or the characters of any language) to display in your PDF documents.

1. The encoding of your stylesheet, or FO document must match the encoding of the embedded characters.
That means that if you are embedding chinese multi-byte characters in your document, you must put an encoding attribute on the stylesheet that matches the encoding used to create the multi-byte character (You seem to be using Big5, also available is UTF-8 etc.) I use <?xml version="1.0" encoding="UTF-8"?>
2. If you are using and XSL stylesheet to generate the FO, you need to make sure that the encoding is also passed through to the FO document (which may only exist in memory but you still need to pass the encoding)
3. You need to embed a font that will display that character. And the font must map the multi-byte character in the encoding to the character that you want.


An alternative (which is how I do it because I got tired of wrestling with all the font character encoding issues) is to convert all of your multi-byte characters into unicode character entities. They can be found here: http://www.unicode.org/charts/ I use Microsoft word's save as web page feature to generate the entities.

Chuck Paussa

Kevin Yeung wrote:

Hi all

I would like to know if FOP supports i18n. Can I embed Chinese characters
in my XSL and export it to PDF?

Thanks & regards
Kevin








Reply via email to