utf-8 to Windows-1252 encoding with XSL
Posted: Tue Feb 26, 2013 7:07 pm
Hi everyone,
I have a XSL transformation which reads a XML file encoded in UTF-8 and writes a text file which must be encoded in Windows-1252.
So I wrote the following line in my transformation.
<xsl:output method="text" encoding="Windows-1252" />
Everything was working fine until I ran into an UTF-8 character which is absent in Windows-1252.
It creates a fatal error.
I can't find a way to specify that any character unavailable in Windows-1252 can be skipped and I have no idea how to solve this problem.
Any ideas?
Thanks for your help!
Guillaume
I have a XSL transformation which reads a XML file encoded in UTF-8 and writes a text file which must be encoded in Windows-1252.
So I wrote the following line in my transformation.
<xsl:output method="text" encoding="Windows-1252" />
Everything was working fine until I ran into an UTF-8 character which is absent in Windows-1252.
It creates a fatal error.
I can't find a way to specify that any character unavailable in Windows-1252 can be skipped and I have no idea how to solve this problem.
Any ideas?
Thanks for your help!
Guillaume