html - How to read the encoding header without knowing the encoding? -


If I'm reading an XML of the HTML file, then I do not want to read the tag that tells me the encoding file Able to read? Is not that type of file encoded by the file? I'm curious to know how to read that tag along with knowing encoding. I know that this problem has been solved. I am just curious how it happened.

Update 1

I do not get it, each character takes 2 bytes in UTF-16 habit, not one, and isolated from ASCII? For example, in the UTF-16 (U + 0045), the character E. 0xfeff0045 is 0xfeff if 0x0045, but some encodings change its endian. Do you have to understand it with checkin for 0xfeff and realize that ASCII or nothing can be done?

What is the W3C to say about it:

XML encoding The declaration function denotes an internal label on each unit, before the character encoding is in use before an XML processor can read the internal label, however, it should be clearly known which character encoding is in use - which That internal label is trying to signal. In the general case, it is a disappointing situation, it is not completely disappointing in XML, however, because XML limits the general way in two ways: each implementation is considered to be a limited set of character encoding only, and The XML encoding declaration is restricted to the condition and content to ban it in normal cases in each case A unit is possible to automatically detect character encoding in use.


Comments

Popular posts from this blog

asp.net - Javascript/DOM Why is does my form not support submit()? -

sockets - Delphi: TTcpServer, connection reset when reading -

javascript - Classic ASP "ExecuteGlobal" statement acting differently on two servers -