开发者

utf8 format in xml

开发者 https://www.devze.com 2022-12-29 18:31 出处:网络
i want to know how to store this è (this type of symbols) in xml file if i store this symbol in xml file..

i want to know how to store this è (this type of symbols) in xml file

if i store this symbol in xml file..

the file shows this symbol like �

i was inserted in front of xml file is <?xml version="1.0" encoding="UTF-8"?>

but 开发者_Go百科that doest not shows correct

thanks and advance


Did you remember your XML declaration?

<?xml version="1.0" encoding="UTF-8"?>
<element>egalité</element>

You also need to ensure that the document is actually stored as UTF-8; check the encoding settings of the text editor used to make it for this.


You have a character encoding problem. The encoding used to save the file does not match the one being used to read the file. Ideally, both should use an encoding like UTF-8. Ensure you are writing and reading the file correctly in this regard. You would have to show more about what you are doing to get a more specific reply.


I had a similar problem today...in my case the file wasn't saved as UTF-8...

try e.g. notepad++ (maybe windows editor supports this also) and change the encoding to utf8. after this replace the silly symbol by your é again.

this should help ;-)


If you save xml file encodind in UTF-8 (in Notepad use save as and choose UTF-8 encoding) and start your xml file with the line

<?xml version="1.0" encoding="UTF-8"?>

it will work. To verify your results just open xml file in Internet Explorer.


If you have problem while you insert

<?xml version="1.0" encoding="UTF-8"?> 

inside of your XML Document, Then you don't save your xml as a UTF-8 document. to do this.

Copy all of you XML contentin memory, open 'notepad' and Paste the content in 'notepad'. then Save your document as a Unicode document (from save dialog box (file type))

0

精彩评论

暂无评论...
验证码 换一张
取 消