UTF-8 declaration in xml-eader

Hello, I have got a question concerning the XML-header. When writing the xml I make use of utf-8 encoding. That works fine, but the utf-8 is written in small letters. I found an article (unfortunately only in german) that tells that UTF-8 shoul be written in capital letters. http://de.wikipedia.org/wiki/Extensible_Hypertext_Markup_Language[https://3c.web.de/mail/client/dereferrer?redirectUrl=http%3A%2F%2Fde.wikipedia.org%2Fwiki%2FExtensible_Hypertext_Markup_Language&selection=tfol11a294064efd3d00] "Die Zeichenkodierung UTF-8[https://3c.web.de/mail/client/dereferrer?redirectUrl=http%3A%2F%2Fde.wikipedia.org%2Fwiki%2FUTF-8&selection=tfol11a294064efd3d00] sollte in Großbuchstaben geschrieben werden" Is it possible to make lxml write capital letters? Or do you think this is not a problem to use small letters. lxml-output: <?xml version="1.0" encoding="utf-8"?> desired output: <?xml version="1.0" encoding="UTF-8"?> Thank you for your comments on this, Cheers, Christoph

Le 02/01/2013 11:10, Christoph Kleih a écrit :
German Wikipedia (which you’re quoting) lists this as its source: http://blog.codingoutloud.com/2009/04/08/is-utf-8-case-sensitive-in-xml-decl... I don’t think this is ever a problem in practice. Even a theoretical parser that insists on case-sensitivity (and should be fixed) would fail to parse the encoding declaration and use the fallback which is UTF-8. The Encoding standards (built by looking at what web browsers actually do) even specifies ASCII-case insensitivity: http://encoding.spec.whatwg.org/#concept-encoding-get Cheers, -- Simon Sapin

Le 02/01/2013 11:10, Christoph Kleih a écrit :
German Wikipedia (which you’re quoting) lists this as its source: http://blog.codingoutloud.com/2009/04/08/is-utf-8-case-sensitive-in-xml-decl... I don’t think this is ever a problem in practice. Even a theoretical parser that insists on case-sensitivity (and should be fixed) would fail to parse the encoding declaration and use the fallback which is UTF-8. The Encoding standards (built by looking at what web browsers actually do) even specifies ASCII-case insensitivity: http://encoding.spec.whatwg.org/#concept-encoding-get Cheers, -- Simon Sapin
participants (3)
-
Christoph Kleih
-
Simon Sapin
-
Stefan Behnel