You can explicitly declare the character encoding in the XML declaration at the beginning of an XML document using the encoding attribute:
<?xml version="1.0" encoding="UTF-8"?>
Which are the valid xml encoding strings?
Valid XML encoding strings are that identify a character encoding scheme recognized by XML processors. The XML 1.0 specification ensure that all XML processors must support UTF-8 and UTF-16. Encoding names must match with the IANA registered characterset.
https://www.iana.org/assignments/character-sets/character-sets.xml
what is the way of specifying UTF-8?
encoding="UTF-8"
encoding names are case-insensitive so "UTF-8","utf8" are valid.But as per IANA registered name use UTF-8
where I could find a list of the official encoding string?
https://www.iana.org/assignments/character-sets/character-sets.xml
for more reference