by Michael S. Kaplan, published on 2012/02/13 07:01 -05:00, original URI: http://blogs.msdn.com/b/michkap/archive/2012/02/13/10267034.aspx
Over six years ago, on Wednesday, February 9th, 2005, I blogged the blog in this Blog entitled What is the difference between Big Endian and Little Endian Unicode?.
cue gratuitous art of the File Save dialog and the "Big Endian Unicode" option Notepad adds:
About six years and one day later, on Friday, February 10th, 2012, Diane posed a question in a comment to that blog:
How can I open a file once I have saved it as unicode big endian?
The short answer is to just open it the normal way!
If you are using Notepad or Wordpad or Word or several other programs, they will all detect the BYTE ORDER MARK (BOM) that Notepad inserts at the beginning of the file, and they will open it!
But let's assume there is more to this one....
For example, if Diane is a programmer trying to open the file, it becomes slightly more complicated of course -- one's best choice involves opening it using the .NET UnicodeEncoding class with one of the two constructors that tells people to expect Big-Endian Unicode, and the second best choice involves opening the file in binary mode and swapping the bytes.
I suppose I could take the opportunity Diane's question affords me to travel back in time to the pre-Windows 2000 days, and wax nostalgically to be present during the original conversations where they decided to expand that dialog to support three kinds of Unicode, and so on. I could ask Chris Walker, he'd give me the skinny here, maybe tell me the real story about what happened in 98-99 that led to adding both UTF-8 and UTF-16 BE. :-)
cheong00 on 13 Feb 2012 6:29 PM:
I think it could be opened in other editors (I think Notepad++ and UltraEdit can do let you specify to look at the file with which encoding).
It'd be cool if there's a way to manually selecting the open file code page too.
Btw, I just realized UTF16LE and UTF16BE aren't selectable code page in Internet Explorer, is there any reason for those codepage be leaved out from selection?
go to newer or older post, or back to index or month or day