In SQL Server, the wrong range can make you seem insensitive to one's width! (aka Do my V's look fat?)

by Michael S. Kaplan, published on 2007/12/07 10:16 -05:00, original URI: http://blogs.msdn.com/b/michkap/archive/2007/12/07/6669587.aspx


Previously I wrote about how In SQL Server, the distance between A and Z is wider than you might think, and I followed up the next day with In SQL Server, A-Z, A-z, a-Z, and a-z may not mean the same thing.

Now that first post reminded you of the over 1000 characters that were in the range, and the second reminded you that the boundaries ran easily into case sensitivity issues.

You already see how bad it can be to use these ranges, so think ofthis post as some cumulative knowledge!

This post is going to point out how the boundaries can also run into width sensitivity issues....

Because those figure I gave included all of the Z- and z- like things, including

   U+ff3a    FULLWIDTH LATIN CAPITAL LETTER Z

   U+ff5a    FULLWIDTH LATIN SMALL LETTER Z

This makes for two more exceptional cases of letters that will not be covered if your range ends with either Z or z. Even though your range will handle all of the other full width letters.

You may want to dismiss this case, since "your customers won't use these characters" but ask yourself what would be the customer expectation if they did? How would they feel when you explained the case you missed -- better or worse? And imagine if they find this post, how would they feel then?

Hint to database developers: Testers love bugs like this, since once they are reported to you, you kind of no choice but to fix them. :-)

Have you figured how to handle the uppercase/lowercase issue from yesterday? If so, then you can slightly adjust your solution at this point.

You probably know where I will go with this next, but I'll keep you in suspense another day....

 

This post brought to you by Z (U+ff3a, aka  FULLWIDTH LATIN CAPITAL LETTER Z)


no comments

Please consider a donation to keep this archive running, maintained and free of advertising.
Donate €20 or more to receive an offline copy of the whole archive including all images.

referenced by

2007/12/11 In SQL Server, there is the rest of Unicode (aka the SiaO Incompleteness Theorem)

2007/12/10 In SQL Server, different collations implies different ranges (aka Not every table has its THORN)

2007/12/09 In SQL Server, the alphabet does not end at Z!

2007/12/08 In SQL Server, your ranges also need to ACCENT-uate the positives!

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