Reputation: 1417
Warning: I did not write the XSLT referenced here
I have an XSL that has encoding on xsl:output set to UTF-8. The XSL document declares a variable firstTierLabel which it then use.
<xsl:template name="genFirstTierTD">
<xsl:param name="rowspan"/>
<xsl:param name="firstTierLabel"/>
<td class="headFirst" colspan="1">
<xsl:attribute name="rowspan"><xsl:value-of select="$rowspan"/></xsl:attribute>
<span>
<xsl:attribute name="class"><xsl:value-of select="'firstLevelText'"/></xsl:attribute>
<xsl:value-of select="$firstTierLabel"/>
</span>
</td>
</xsl:template>
The XML files I have use this XSLT to transform a line such as:
<field name="LINE 1 –" label="LINE 1 –">
<field2 name="DATE AND TIME" label="DATE AND TIME" type="xsd:dateTime">
<tooltip> DTG </tooltip>
<cssClass>ncssHeaderValDtg</cssClass>
</field2>
</field>
Into part of a table row that should look something like:
| LINE 1 - | DATE AND TIME |
But what I'm getting back is (notice the ? after "LINE 1"):
| LINE 1 ? | DATE AND TIME |
Now I have 182 of these files, some with 200+ lines which I have little-to-no control over...is there any way I can convert that non-UTF character?
Upvotes: 1
Views: 370
Reputation: 43168
This has nothing to do with your <xsl:output>
setting, if the character is not decoded on the way in. Check the encoding of the reader on the input document. That's where you need to ensure that the bytes are understood.
Upvotes: 2