| |

VerySource

 Forgot password?
 Register
Search
View: 5|Reply: 0

Ask questions about XML encoding

[Copy link]

1

Threads

1

Posts

2

Credits

Newbie

Rank: 1

Credits
2

 United States

Post time: 2020-3-18 00:30:01
| Show all posts |Read mode
The header of a general XML document has the following sentence
<? xml version = "1.0" encoding = "utf-8"?>
I have questions about this:
Question 1: For a text file, the file header has two bytes of FFFE to indicate that it is UTF8 encoded. What is the use of this sentence?

Question 2: If it is a network transmission or a direct byte stream transmission, then after receiving a stream that should be an XML document, it is assumed that <? Xml version = "1.0" encoding = "xxxx"?> Exists in the stream What kind of code is this paragraph? If this paragraph is xxxx code, how do I know how to read it before I have read it? Could it be notified before transmission? This problem also applies to XML file rules for other encodings (non-UTF, such as Korean, etc.).
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2020|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list