Welcome to MSDN Blogs Sign in | Join | Help

September 2006 - Posts

Best Way to Make Your Own Encoding

Martin recently asked what the best way to roll his own encoding in .Net 2.0, in particular can you override Encoding/Encoder/Decoder, or should he write his own StreamWriter. #1 is, of course, to use Unicode :), but apparently Martin doesn't have that
Posted by shawnste | 3 Comments
Filed under:

List of "ANSI" code pages used by Windows.

These are the "ANSI" code pages that could be used by CP_ACP. Other code pages should not appear as "ANSI" code pages in Windows. 874 windows-874 ANSI/OEM Thai (same as 28605); Thai (Windows) 932 shift_jis ANSI/OEM Japanese; Japanese (Shift-JIS) 936 gb2312

RegionInfo objects are sensitive to a specific culture.

You can use a RegionInfo() object with a region name in the constructor, like "US", however that doesn't always provide appropriate results. The RegionInfo properties, such as DisplayName for example, depend on the language and culture being used. So
Posted by shawnste | 0 Comments

VBScript's SetLocale doesn't know about new Vista locales.

I just discovered that VBScript has a SetLocale() function that apparently is backed by a static list of locale names, which means that its locale names aren't consistent with the list supported in Vista. Fortunatly SetLocale(0) gets you the current user

IDN Test URLs

A colleague gave me some URLs to use for testing IDN. I don't vouch for any of these sites, and some are obvious ads and some may be inappropriate (since I can't read them), but maybe they'll be helpful for testing. Additionally some sites could be phishing,

How do I get localization in JScript (JavaScript) in IE7?

I ran into an interesting problem with a Vista sidebar calendar gadget. It seems that it is not exactly trivial to find out interesting NLS data like localized month names, first day of week, etc. from JScript. Eventually I found a workaround for some

Does your web site die when it sees unexpected languages?

Recently I've seen a spate of bugs involving client-server web applications related to the user locale. Windows Vista has added a ton of locales that weren't there in XP or Server 2003 or Microsoft.Net v2.0. Additionally users can create and use their
 
Page view tracker