2010-06-28 75 views
0

我正在使用XSLT來顯示一些  (空間)和£ (英鎊)的跡象,但他們都出來問號(無法識別的字符)。Java/XSLT字符編碼

我的編碼在HTML設置爲UTF-8和XSLT頭看起來像這樣

<xsl:stylesheet 
    version="1.0" 
    xmlns:xhtml="http://www.w3.org/1999/xhtml" 
    xmlns="http://www.w3.org/1999/xhtml" 
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
exclude-result-prefixes="xhtml xsl"> 

<xsl:output method="xml" version="1.0" encoding="UTF-8" charset="utf-8" doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" indent="yes" omit-xml-declaration="yes" /> 

沒有人有任何想法我要去的地方錯了嗎?

非常感謝。

回答

1

我發現我設置的內容類型爲text/html - 將其設置爲text/html; charset = utf-8更正了問題