0
我有一個使用fop和xslt生成PDF文件的應用程序。在PDF中,特殊字符§£?ÐÅÆ
顯示爲????
。使用weblogic服務器的Solaris上的特殊字符編碼問題
weblogic服務器在solaris機器上運行。 我已經嘗試與
<charset-params>
<input-charset>
<resource-path>/*</resource-path>
<java-charset-name>UTF-8</java-charset-name>
</input-charset>
<charset-mapping>
<iana-charset-name>UTF-8</iana-charset-name>
<java-charset-name>UTF-8</java-charset-name>
</charset-mapping>
</charset-params>
在weblogic.xml
。
我也試圖與
transformer.setOutputProperty(OutputKeys.METHOD, "xml");
transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "2");
transformer.setOutputProperty(OutputKeys.INDENT, "yes");
transformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8");
似乎沒有任何要在那裏工作。
我的服務器是Solaris 5.10 sparc。這條道路會好嗎?如果沒有,如何獲得適當的字體路徑。另外,請告訴我如何在我的Web應用程序中提供對此文件的引用。我需要在web.xml中的某個地方註冊這個文件,或者需要添加一些java代碼來使用它。 – saurabh 2011-05-06 11:09:59
我是新來的FOP,所以我對此沒有太多的想法。我試着用fopFactory.setUserConfig(new File(servletContext.getRealPath(「/ xml/fo/fop-conf.xml」)));在我的PDF生成器類,並使用上述的XML,但沒有奏效。 – saurabh 2011-05-06 12:12:59
以下是我的代碼.... – saurabh 2011-05-06 12:13:48