If it isn't Unicode, it isn't ANY code!

by Michael S. Kaplan, published on 2007/09/23 05:51 -04:00, original URI: http://blogs.msdn.com/b/michkap/archive/2007/09/23/5070899.aspx

Raymond makes a good point in What happens if you pass a source length greater than the actual string length? about the potential dangers of the NLS semantic for length parameters....

I make a similar point about the potential problems in Encoding APIs and Security Concerns, APIs and Security Decisions, though I stand by my point in API Consistency and Developer Comfort about how (since you cannot rely on consistency across the Win32 API, at least you can often rely on consistency within families of functions (usually).

In the end, the real errors are fourfold from the NLS point of view in the scenario Raymond talks about, in addition to the actual semantic differences with how length parameters are handled:

How is the title for a new advertising slogan? :-)


This post brought to you by(U+0913, a.k.a. DEVANAGARI LETTER O)

no comments

go to newer or older post, or back to index or month or day