← Prev in month ← Prev in thread

Is it a well-formedness error to use a character not in the encoding specified by the XML declaration?

From
Costello, Roger L. <>
To
"" <>
Date
2010-03-18T18:13:00Z
ID
<>
Thread
Is it a well-formedness error to use a character not in the encoding specified by the XML declaration?
Hi Folks,

Consider this simple XML document. The XML declaration specifies an encoding of US-ASCII. The document contains an œ ligature, which is not a US-ASCII character:

<?xml version="1.0" encoding="US-ASCII"?>
<Family-Name>Lecœur</Family-Name>

Should I get an error when I check this document for well-formedness? I checked and didn't get an error. I was surprised, as I thought that this would be a well-formedness error.

/Roger
← Prev in month ← Prev in thread