Re: [xslt] xsltproc changes unicode to nonsense

Paul Tremblay writes:
> In my stlesheet, I have:
> <xsl:output method="html"/>
> I then put this character in my xslt stylesheet:
> &#x00A0;
> This should be a no break space.
> However, xsltproc translates this to a upper case A with a hat over it.
> If I change the output method line to:
No. It outputs a nonbreaking space in utf8 which is (in latin1) 
a upper case A with a hat over, followed by nonbreaking space.
The latter is a bit hard to see but it's there.

Provide an apropriate output encoding (such as ASCII or iso-8859-1)
to get '&#160;' or a literate non breaking space.

> <xsl:output method="xml"/>
> then xsltproc leaves the entity alone. 

This is in deed a bit strange, but AFAIK any xslt processer is free
to choose the way it outputs characters.
So xsltproc might output a utf8 nonbreaking space as well, but it does
not have to.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]