Norwegian Characters Crashes the xslt Load()

It's not only Al Quaida (or whatever spelling that is) that have something against Norwegians these days.

The System.Xml.Xsl.XslTransform also dislikes norwegian stuff. Putting an Æ Ø or Å into a comment section of an xslt stylesheet causes the function to crash with the error message:

An unhandled exception of type 'System.ArgumentException' occurred in system.xml.dll
Additional information: Invalid byte was found at byte index XX.

This especially sucks when my name includes an Ø and I'd like to tag my name to my work. Another two hours wasted in the hard learning of xsl transformations. *Grumpy*

3 Comments

  • Actually, I've tried with every possible kind of encoding. utf-8/utf-16/unicode/windows-1265 etc. Doesn't seem to matter. This only occurs for the text inside the comment section though.

  • Hmm, strange - I tested it with your examples inside a comment, and utf-8/iso-8859-1 didn't give me an exception (but the others did, of course).

  • I put the encoding attribute on the xml root element and no more error. Thanks!

Comments have been disabled for this content.