views:

76

answers:

1

I am using XSLT to display some   (space) and £ (£) signs but they all come out as question marks (unrecognised characters).

My encoding is set to UTF-8 in the HTML and the XSLT header looks like this

<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" />

Does anyone have any ideas where I am going wrong?

Many thanks.

+1  A: 

I found that I was setting the content type to text/html - setting it to text/html;charset=utf-8 corrected the problem

Hobozilla