| |

VerySource

 Forgot password?
 Register
Search
View: 852|Reply: 1

Ask questions about XML encoding

[Copy link]

1

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 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

1

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

 Author| Post time: 2020-7-25 23:45:02
| Show all posts
? What is wrong format?
Reply

Use magic Report

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

Points Rules

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

Quick Reply To Top Return to the list