Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

XML file encoding format "utf-8" VS "UTF-8"?

When the XML file was convert to ASCII. It is different values for user at the three characters of utf and UTF.

<?xml version="1.0" encoding="utf-8"?>   <?xml version="1.0" encoding="UTF-8"?> 

I tried to create a new xml file with vs2005. utf-8 form file generated by default.

which one is a more standard definition? thanks.

like image 596
Nano HE Avatar asked Jul 15 '10 01:07

Nano HE


People also ask

Does XML use UTF-8?

You can write the XML file in any text editor. For non-ASCII characters, such as characters with diacritics and Kanji characters, an editor that can save the file as UTF-8 is required. Because UTF-8 is not easily displayed or edited on z/OS®, the XML can be encoded in UTF-8 or using the agent's code page.

Is UTF-8 same as UTF-8?

UTF-8 is a valid IANA character set name, whereas utf8 is not. It's not even a valid alias. it refers to an implementation-provided locale, where settings of language, territory, and codeset are implementation-defined.

What is UTF encoding in XML?

Encoding Types UTF stands for UCS Transformation Format, and UCS itself means Universal Character Set. The number 8 or 16 refers to the number of bits used to represent a character. They are either 8(1 to 4 bytes) or 16(2 or 4 bytes). For the documents without encoding information, UTF-8 is set by default.

What encoding does XML use?

XML documents must be encoded in a supported code page. XML documents generated in or parsed from national data items must be encoded in Unicode UTF-16 in big-endian format, CCSID 1200.


1 Answers

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.

like image 159
dan04 Avatar answered Oct 02 '22 21:10

dan04