Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries >Thread Prev - Re: Umlaut in XML [Thread Next] Re: Umlaut in XMLTo: NULL Date: 12/1/2008 12:17:00 AM Waldy wrote: > I 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. > I 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. > If 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 "ä"> ]> > I have however tried using ä again and it works! Yes, numeric references work everywhere. > I 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/ | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
