When the XML file was convert to ASCII. It is different values for user at the three characters of utf
and UTF
.
Upper-case is the de-facto standard. It should still work with any combination of case, however.
From the XML specification:
"XML processors SHOULD match character encoding names in a case-insensitive way"
This indicates that you can use upper case or lower case or even mixed case if you wish. However, the specification uses "UTF-8" in all its examples so for consistency I'd go with that.
In my experience (which is primarily with .NET), character set identifiers are treated as case-insensitive, so UTF-8
and utf-8
, as well as Utf-8
or any other variation thereof, always mean the same thing. This would also be the case for other character sets, such as ISO-8859-1
(Latin 1), etc. The casing should not matter, as case is not a meaninful factor in such an identifier.
I do extensive work with web services across multiple platforms, and I have never really seen a "standard" form used. I've seen every variation of a variety of character sets...often different variations from a single business partner.
For those interested in the gory details - including links to some of the related standards and precedents - I blogged a couple of years ago about Case-Sensitivity of UTF-8 in XML Declarations.
The IANA character set registry says:
no distinction is made between use of upper and lower case letters.
But that page, the XML specification, and unicode.org are consistent about capitalizing UTF-8.