Sign In
I'm not a Klingon (
)
Shawn Steele's thoughts about Windows and .Net Framework globalization APIs
Translate This Page
Translate this page
Powered by
Microsoft® Translator
Options
Email Blog Author
RSS for posts
Atom
RSS for comments
OK
Search
Advanced search options...
Search In:
Everything
Blogs
Forums
People
Groups
Places
Pages
Date range:
All Time
Last Year
Last 6 Months
Last 3 Months
Last Month
Last Week
Last Two Days
Tags
Custom Cultures / Locales / CultureInfo
Dates & Times
eMail Address Internationalization
IDN (Internationalized Domain Names)
Klingon
Pages
Sailing
Silverlight
sorting
System.Text
Unicode and Code Pages/Encodings
Windows Home Server
Archive
Archives
November 2011
(3)
March 2011
(2)
January 2011
(1)
December 2010
(2)
October 2010
(2)
September 2010
(1)
July 2010
(1)
May 2010
(2)
February 2010
(2)
January 2010
(2)
November 2009
(2)
October 2009
(2)
September 2009
(3)
August 2009
(3)
July 2009
(1)
June 2009
(3)
May 2009
(4)
November 2008
(1)
September 2008
(8)
August 2008
(1)
July 2008
(1)
June 2008
(2)
May 2008
(1)
April 2008
(2)
March 2008
(3)
January 2008
(1)
December 2007
(3)
November 2007
(1)
October 2007
(1)
September 2007
(1)
August 2007
(2)
July 2007
(4)
June 2007
(6)
May 2007
(5)
April 2007
(3)
March 2007
(8)
February 2007
(5)
January 2007
(2)
December 2006
(1)
November 2006
(3)
October 2006
(4)
September 2006
(7)
August 2006
(5)
July 2006
(3)
June 2006
(8)
May 2006
(2)
April 2006
(1)
March 2006
(1)
February 2006
(4)
January 2006
(4)
December 2005
(5)
November 2005
(2)
October 2005
(1)
September 2005
(2)
August 2005
(3)
May 2005
(1)
April 2005
(2)
March 2005
(17)
March, 2005
MSDN Blogs
>
I'm not a Klingon (
)
>
March, 2005
Posts
Subscribe via RSS
Sort by:
Most Recent
|
Most Views
|
Most Comments
Excerpt View
|
Full Post View
I'm not a Klingon (
)
CultureInfo Caching and ClearCachedData()
Posted
over 7 years ago
by
Shawn Steele - MSFT
0
Comments
Windows and the .Net Framework work a bit differently when it comes to accessing culture/locale data. Since I'm discussing Windows locales and .Net cultures I’d like to point out that culture and locales provide similar functionality. We generally refer...
I'm not a Klingon (
)
Example using Custom Cultures to "combine" cultures in .Net Framework v2.0 (Whidbey)
Posted
over 7 years ago
by
Shawn Steele - MSFT
2
Comments
A few of you have asked how to create something like es-US. (Spanish in the US). Here's a start of how you might do something like that. This code has many faults and concerns, so you should look at how these work for your application. I didn't include...
I'm not a Klingon (
)
UTF8 Security and Whidbey Changes
Posted
over 7 years ago
by
Shawn Steele - MSFT
4
Comments
Unicode is always in the process of evolving, and some changes have been made to UTF8 in the last few versions. The UTF-8 algorithm is fairly simple, but there are a few clarifications that are important for security reasons. Primarily there is...
I'm not a Klingon (
)
"Precomposed" and "Composite" Characters in Windows APIs
Posted
over 7 years ago
by
Shawn Steele - MSFT
0
Comments
The term Composite and Precomposed in the Windows docs give me trouble, so I suspect they give other people trouble. Basically Unicode provides 2 ways of encoding some characters. Sometimes a character can be encoded as a single character (like Ä or U...
I'm not a Klingon (
)
MultiByteToWideChar ignores MB_PRECOMPOSED behavior for UTF-8 and UTF-7
Posted
over 7 years ago
by
Shawn Steele - MSFT
2
Comments
UTF7 and UTF8 conversion by MultiByteToWideChar and WideCharToMultiByte is strictly Unicode to Unicode and none of the flags are honored except for WC_ERR_INVALID_CHARS. I've noticed a few cases where people expect MB_PRECOMPOSED behavior because the...
I'm not a Klingon (
)
How the various CultureInfo names and tags behave.
Posted
over 7 years ago
by
Shawn Steele - MSFT
1
Comments
With the introduction of sort names and custom cultures in the .Net Framework 2.0 (Whidbey) a few things about culture names had to be clarified. Three are 4 ways you can get names that look a lot like culture names: 1) CultureInfo.Name 2) CultureInfo...
I'm not a Klingon (
)
Try to identify cultures by string name instead of LCID
Posted
over 7 years ago
by
Shawn Steele - MSFT
0
Comments
It is a good idea to avoid using the locale LCID when referring to cultures in .Net. Instead, use the language tag (e.g. use “en-US” instead of 0x0409). The biggest obvious reason is Custom Cultures. All custom cultures share the same LCID, so new CultureInfo...
I'm not a Klingon (
)
Whidbey Beta 2 bug with CreateSpecificCulture() for Neutral Custom Cultures.
Posted
over 7 years ago
by
Shawn Steele - MSFT
0
Comments
There's a bug in Whidbey Beta 2 where CreateSpecificCulture() will return invariant for any neutral custom culture, including both replacement and supplimentary cultures. So even replacements of something like "en" will have Invariant instead of "en-US...
I'm not a Klingon (
)
Neutral Cultures and CreateSpecificCulture()
Posted
over 7 years ago
by
Shawn Steele - MSFT
3
Comments
Many of you have observed that some things don't work with neutral cultures. Some fields require culture specific data to behave correctly. For example, in en-US, you might expect M/d/yyyy for a date pattern, however en-GB has dd/MM/yyyy and en-ZA has...
I'm not a Klingon (
)
Don't Use Encoding.Default
Posted
over 7 years ago
by
Shawn Steele - MSFT
3
Comments
So you want to save some data and don't know which Encoding to use. My biggest suggestion is please do NOT use Encoding.Default. Huh? That can't be right. You heard me right, please don't use Encoding.Default. Encoding.Default sounds like the right...
I'm not a Klingon (
)
What's the difference between an Encoding, Code Page, Character Set and Unicode?
Posted
over 7 years ago
by
Shawn Steele - MSFT
1
Comments
Encoding, Code Page and Character Set are often used interchangeably, even when that isn't strictly correct. There are some distinctions though: Characters are usually thought of as the smallest element of writing that has a meaning. It could be a punctuation...
I'm not a Klingon (
)
"So Why Isn't Latin Shipped With the Framework?"
Posted
over 7 years ago
by
Shawn Steele - MSFT
3
Comments
Lots of people ask this question, replacing Latin with their favorite language. http://www.ethnologue.com/language_index.asp might give a hint as to the size of the general problem. There are about 6800 known languages, in many more language/country combinations...
I'm not a Klingon (
)
Whidbey .Net 2.0 Custom Culture Example (Beta 2)
Posted
over 7 years ago
by
Shawn Steele - MSFT
5
Comments
Here’s an example of how to create a custom culture in Whidbey. Its changed a bit from earlier versions, so this code is based on Beta 2 behavior. This should be what you see in RTM. J This sample creates a custom culture with the name “en-US-shawn”,...
I'm not a Klingon (
)
Rambling on About Custom Cultures in .Net 2.0 (Whidbey)
Posted
over 7 years ago
by
Shawn Steele - MSFT
3
Comments
People keep asking questions like “How do I get Latin cultures in .Net?” Well, in Whidbey we’re adding Custom Cultures. A custom culture is a culture that is created and installed on the system by a user with admin privileges. Once installed custom cultures...
I'm not a Klingon (
)
IDN & Homographs
Posted
over 7 years ago
by
Shawn Steele - MSFT
3
Comments
I’ve divided this into a few parts: About IDN IDN & Security Homograph Thoughts Conclusion About IDN: My interest in IDN is that I’m the SDE for the System.Globalization.IdnMapping class in Whidbey . I also think its pretty nifty for the users in...
I'm not a Klingon (
)
What's with Encoding.GetMaxByteCount() and Encoding.GetMaxCharCount()?
Posted
over 7 years ago
by
Shawn Steele - MSFT
1
Comments
The behavior of Encoding.GetMaxByteCount() changed somewhat between .Net version 1.0/1.1 and version 2.0 (Whidbey). The reason for this change is partially because GetMaxByteCount() didn't always return the worst-case byte count, and also because the...
I'm not a Klingon (
)
About My Blog
Posted
over 7 years ago
by
Shawn Steele - MSFT
I don't plan to blog very often, but I will try to address lots of the issues and questions that often arise as I go about my work. I don’t mind comments or pointing out errors. In those cases I’ll probably fix any inaccuracies in my posts. I may remove...
Page 1 of 1 (17 items)