I have the following xsl-fo code, attempting to produce foreign characters.
<?xml version="1.0" encoding="UTF-8"?>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
...
<fo:block font-size="11pt" font-family="calibri" language="pl">
Odwrotna strona tego pisma zawiera ważne informacje. jeżeli potrzebuje Pan/i pomocy, aby je zrozumieć, proszę
zadzwonić pod numer X-XXX-XXX-XXXX po bezpłatne usługi językowe.
</fo:block>
I've tried every font-type I can think of to access the required unicode characters, but have had no success so far.
Is there something wrong with my formatting? Or the unicode I'm using? Or perhaps I haven't declared my XML properly?
This, and my Korean, Chinese, and Russian unicode characters are the only ones giving me trouble at the moment. Whereas my Spanish and Croatian unicode characters are working fine.
If you are having problems displaying special characters in your file you can try defining them in configuration file. Here http://xmlgraphics.apache.org/fop/trunk/output.html#afp-configuration you might find how to do it. Also make sure you have path to your fonts directory correctly specified. In Windows it should look something like that:
<fonts>
<directory recursive="true">C:\Windows\Fonts</directory>
<auto-detect/>
</fonts>
来源:https://stackoverflow.com/questions/17956218/xsl-fo-foreign-characters-polish-unicode-in-apache-fop-v-1-1