See that version there? It is going down, man! #1

Sorting it all Out
Michael Kaplan's random stuff of dubious value
Be sure to read the disclaimer here first!

See that version there? It is going down, man! #1

  • Comments 4

When I first started working in Windows and for several years, I did not really act by default like a member of the Windows team -- I kept looking at problems like an outsider and it was an effort of will to look at things from the inside.

For the most part this was very helpful since it helped me to be able to point out times that people were missing out on some external developer scenarios.

But slowly that viewpoint faded, and while I did not forget the work I did before, the viewpoint changed.

Add to that the times that specific scenarios are not ones you have been thinking about, because they did not occur to me and no one else mentioned them.... and if you don't think of them and they aren't in th spec and no tester puts in a bug about them, then how is one supposed to keep them in mind?

I'll now give a good example of this. :-)

When I talked about the recommended process for using the NLS version information to figure out when to re-index, first back in What makes a string meaningful? and then in Collation data - must be stable, but it must not stand still, I was thinking about components that worked on that version of Windows and moved forward when Windows did. That process:

  1. Any time the major version is incremented, you should re-index no matter what, and
  2. Any time the minor version is incremented, you should re-index for any entry where IsNLSDefinedString used to return FALSE (in case it now returns TRUE or different results due to part of the string now being defined)

This is all well and good, but there are a few scenarios that are not covered here:

  • What to do if you install a version of Windows or service pack that had a major version update;
  • What to do if you use the collation functionality on a different machine that has a lower major version;
  • What to do in either of the above cases when a lower minor version is involved.

This puts a cat among the pigeons, doesn't it?

Not impossible, by any means.

But also not currently described in the docs or here at SIAO Plaza.

I'll let this simmer for a bit and I'll come back with the additional rules in the morning.

You have a few hours if you want to take a guess on one or all of them, or somewhere in between.

Winners of this contest can read this blog free, for life! :-)

 

This post brought to you by (U+17af, a.k.a. KHMER INDEPENDENT VOWEL QE)

Comment on the blather
Leave a Comment
  • Please add 3 and 1 and type the answer here:
  • Post
Blog - Comment List
  • Well, I'd say if the major version changes *either way* you should re-index.

    If a minor version changes backwards, you probably have to re-index as well. Because otherwise, you basically have to re-index strings that *now* return FALSE for IsNLSDefinedString and you couldn't do that without scanning them all -- so you may as well just re-index everything.

    To be honest, though, I don't see how you could have done anything differently. If you wanted to skip the "re-index on minor version decrement", I believe you would have to change IsNLSDefinedString so that it returned the minimum version that the string would have been defined in, and I can't imagine how big the data file would have to be to make that possible :-)

  • You have been assimilated. Resistance was futile.

  • When I posted part one of this two part series, I should have guessed that Dean Harding would have a

  • Yes, as the title indicates this is post # 2001 of Sorting it all Out! There have over the last few years

Page 1 of 1 (4 items)