XML file encoding

specifying a character encoding for xml this is where the encoding attribute in an xml declaration comes in. it allows you to specify to the xml parser what character encoding your text is in.the xml parser can then read the document in the proper encoding and translate it into unicode characters internally.if no encoding is specified, utf-8 or utf-16 is assumed.if no encoding is specified and the document is not uft-8 or utf-16, the parser raises an error.

if you'er running windows xp, notepad gives you the option of saving your text files in unicode, in which case you can omit the encoding attribute in your xml declarations

XML file encoding declaration

encode a xml file, set with encoding attribute in xml declaration.

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