Post by WaldyI am trying to use this in a standard .Net configuration file. Hi The
encoding is declared at the top of the file as utf-8.
Just saying that the file is encoded in UTF-8 doesn't mean that it is.
Like putting a label on your toothpaste tube that says "Tomato puree"
doesn't make it tomato puree. The file has to BE in UTF-8.
Post by WaldyI get an XML
exception when I use the umlaut, "Invalid character in the given encoding".
That indicates that the file is not in UTF-8.
Post by WaldyIf I change it to ä I get the error "Reference to undeclared entity".
Correct. If you want to use named character entity references you must
declare them in a DTD or an internal subset, eg
<?xml version="1.0"?>
<!DOCTYPE whatever [
<!ENTITY uuml "ä">
]>
Post by WaldyI have however tried using ä again and it works!
Yes, numeric references work everywhere.
Post by WaldyI don't know what happened the first time, but thanks anyway.
Check the encoding of the file. If it's not UTF-8, use iconv or whatever
the equivalent is in Windows to convert it. If you can't convert it,
change the encoding declaration to say what is really being used (eg
ISO8859-1). Leaving it broken will cause subsequent users problems.
///Peter
--
XML FAQ: http://xml.silmaril.ie/