Logo 
Search:

C# Answers

Ask Question   UnAnswered
Home » Forum » C#       RSS Feeds
  Question Asked By: Doan Tran   on Aug 31 In C# Category.

  
Question Answered By: Muntasir Bashara   on Aug 31

Error Message: There is no unicode  byte order  mark. Cannot switch  to Unicode.

This error  generally occur when loading xml file that is encoded in utf-16 format.

Error Parsing message: System.Xml.Exception: There is no Unicode byte  order mark. Cannot switch to unicode.

Error Solutions: What is UTF? Unicode transformation format (UTF) is an algorithmic mapping from every Unicode code point to a unique byte sequence. UTF-8 and UTF-16 are simply different algorithms, but they can both represent any (16 bit) Unicode character.

So What to choose in web applications When we talk about web applications, it's characters exchanged between systems,and here UTF-8 is preferable. Just think of an English language web site using UTF-16. Every character delivered over the web would take two bytes. When using UTF-8, almost all characters would take only one bytes, save for special cases like the Euro symbol. UTF-16 can become quite expensive.So for web apps, stick with UTF-8

More on Unicode
http://www.microsoft.com/globaldev/getWR/nwr/nwrpartVI.mspx

Share: 

 
 


Tagged: