About XML Encoding Conversion
Encoding characters is a process where decimal or hexadecimal numbers represent the characters you see on your screen. XML uses encoding to ensure that each search engine and web browser can identify accurately the characters the XML file represents.
-
Significance
-
Each operating system, web browser and search engine reads and displays characters based on the code. XML programmers define the encoding structure at the top of the XML file to tell readers how to read the characters accurately. Without encoding, some programs read the XML file incorrectly, which results in the "garbage characters" seen on some poorly programmed web pages.
Types
-
Some XML readers will auto-detect the type of encoding in the XML file. The two types of encoding automatically recognized are UTF-8 and UTF-16. If XML programmers decide to use another type of encoding, they must specify the encoding at the top of the XML file. The very first line of the file sets the type of encoding.
-
Considerations
-
XML files have tags that look similar to an HTML file, but these tags identify the records and data added to a dynamic web page. If you use standard XML encoding, you do not need to specify the encoding at the top of the file. This avoids accidentally specifying the wrong encoding, which results in errors on your website.
-