Blog - Title

November, 2007

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

    It's like PowerToys for language geeks!

    • 1 Comments

    There are times that a beta comes out that I can really get behind.

    Like earlier today while I toiled away on my slides for that WEX presentation and then later helped my favorite pirate and strange Josh/Gretchen/Michael triangle member Gretchen Ledgard do some random gratis pimping on JobsBlog, and then a bunch of other meetings, I never got to look at email during the day....

    But when I finally did get to look at email, and noticed that early while I was doing those last-minute slide revisions, Mike Hedley had pointed me at the Visual Studio International Pack 1.0 Beta1 release, by the Developer International group, which is available in five languages! Downloads here:

    The overview of the project:

    The Visual Studio International Pack contains a set of class libraries designed for .NET developers to create world-ready applications. The Visual Studio International Pack 1.0 release provides the following seven components to enhance the globalization features provided by .NET Framework.

    • East Asia Numeric Formatting Library - Format numeric data into Traditional Chinese, Simplified Chinese, Japanese and Korean capital style string.
    • Japanese Kana Conversion Library - Convert one Kana character set to another character representation in Japanese.
    • Japanese Text Alignment Library - Enable applications to render strings in Japanese-specific alignment style.
    • Japanese Yomi Auto-Completion Library - Provide class library and TextBox control sample that support Japanese IME-aware auto-complete.
    • Korean Auto Complete TextBox Control - Provide TextBox control that supports auto-complete and the Intellisense feature with Korean input.
    • Simplified Chinese Pin-Yin Conversion Library - Retrieve Simplified Chinese characters' properties such as polyphone, homophone, Pinyin or number of strokes.
    • Traditional Chinese to Simplified Chinese Conversion Library and Add-In Tool - Convert text in Traditional Chinese into Simplified Chinese or vice versa. This component also includes an add-in tool to the in VS IDE that can convert between Simplified and Traditional Chinese resource files.

    I will probably be talking more about these features as I dig in here. But in any case this is definitely a beta I can get behind. :-)

    And now I am on my way out the door, but I'll check later for comments and such....

     

    This post brought to you by(U+3113, aka BOPOMOFO LETTER ZH)

  • Sorting it all Out

    Get the WEX out of your ears and come see us do our global 'Karate Kid' thing (WEX on, WEX off!)

    • 1 Comments

    Some of you may remember when I talked about the COSD presentation I was co-doing back in the beginning of August (cite) for internal Microsoft folks in COSD.

    And I mentioned that if you were a Microsoft employee in WEX we'd be doing a presentation for them at the end of the month.

    Well, there were some scheduling issues and the WEX training got pushed out....

    But I did not lie -- it is still happening "at the end of the month" as I said -- just not THAT month.It's THIS month.

    It's tomorrow -- Friday, November 30th!

    Developers. Testers, Program Managers, well, everyone actually!

    So if you are in WEX then be sure to show up on November 30th in 33/Kodiak from 11:00am to 1:00pm with over 200 of your bestest colleagues and hear all about globalization for the first half and localizability for the second half of an exciting two hours of some of the most important information [if not in the world then] for the world, and bringing your features to all of it!

    Includes Q&A time after both halves of the presentation that you can bring in your biggest questions to.

    I can promise that all of the WEX puns are out of my system now with the title of this post. :-)

    Truly awesome, and worth the trek.

    Even if you are a regular reader here since some of the stuff we talk about is so new and cool that no one is blogging about it yet!

    Be sure to say hi if you saw the notice about it here, no one is as cool as the people who voluntarily read my blog and then also choose to see the live show as well -- you put DNRC to shame!

     

    This post brought to you by all of the following Unicode characters, in code point order -- a group also known s the happy hexagrams:

    • (U+4dcf, aka HEXAGRAM FOR ENTHUSIASM)
    • (U+4ddb, aka HEXAGRAM FOR GREAT PREPONDERANCE)
    • (U+4dde, aka HEXAGRAM FOR INFLUENCE)
    • (U+4de1, aka HEXAGRAM FOR GREAT POWER)
    • (U+4dea, aka HEXAGRAM FOR BREAKTHROUGH)
    • (U+4deb, aka HEXAGRAM FOR COMING TO MEET)
    • (U+4dec, aka HEXAGRAM FOR GATHERING TOGETHER)
    • (U+4df4, aka HEXAGRAM FOR DEVELOPMENT)

    Being at the presentation and watching/leaning is the best way to see all of these things happen well!

  • Sorting it all Out

    The UK Extended keyboard -- over-extended? Or weirdly extended?

    • 7 Comments

    I have a regular reader who is kind of fond of the blog. She admits to skimming it regularly, kind of a Category B, Cliff Notes version kind of reader.

    Though she also admits that posts about keyboards bore the hell out of her, so once she sees a post is about keyboards, it gets skipped.

    Now that both posts today are clearly about keyboards, it is safe to say that the day is just going to be downhill from here for anyone who shares her opinion on these things....

    However, the needs of the many out weigh, etc, etc. etc.

    Apparently, she isn't reading this, based on the filtering by title, so everyone pretend I made a really amusing joke at her expense (I can't think of one offhand). :-)

    Okay, on to the post....

    Over in the Suggestion Box, DrPizza asked:

    1. I use the "United Kingdom Extended" keyboard layout with English (United Kingdom); it's like a cross between the UK layout and the "United Stats-International" layout (why one should be "international" and the other "extended", and why one should have a hyphen in its name and the other not is beyond me).  Whenever I RDP into my Vista machine, Vista adds, and switches to, the Welsh input language, still using the UK Extended layout.  This is infuriating.  What gives, and is it possible to prevent it?
    2. Given the death of the Unicode IME (which was never especially satisfactory) is there any plan to ever have a non-sucky way of entering otherwise untypable characters?
    3. Is there any way to make keyboard layouts with a compose key, instead of the dead key mechanism?  e.g., using alt-gr as compose, letting me type alt-gr, o, e, (sequentially, no need for concurrent key-presses) to get an œ ligature.

    I'll take these in reverse order, as I think that will allow my answers to become more satisfying/fulfilling, rather than less so....

    For the third item, there is no way to extend the low level keyboarding mechanism in this way, as it truly is a data-based mechanism backed by data "tables" of information, making a generative model such as that impossible, as would altering the behavior of shift keys so markedly....

    For the second item, there are of course already many other methods of inputting such data that exist, covered in posts like Typing in random Unicode code points and those who don;t want to wait for Microsoft do something better can emulate Andrew as I pointed out in Typing in random Unicode code points redux. Better mechanisms are not a bad idea in my opinion, and something more central rather the constant inclusion of features in random components/applications like ALT+X support in RichEdit/Word.

    Questions like what such a mechanism would/could be, where would it sit, and who would own it are of course ones that would need to be answered, though without a really clear sense of usability (remember that most users of Windows don't even know what Unicode is, let alone what code point values map to what characters -- so this is a hard scenario to claim as mainstream!).

    And then there is that first question, the only one I feel I had good answers for! :-)

    Of course the name silliness is not really question anyone can answer, other than the abject fear that the cleanup of the names would lead to a support hit as people called to complain about the changes. :-)

    So let's stick to the technical bit, which has an answer!

    Let's look at the United Kingdom Extended keyboard in its place in the registry:

    You may see it right now -- the KLID value for this keyboard? Its 00000452, and that attached LANGID is the one for cy-GB, aka Welsh (United Kingdom).

    Regular readers my recall some of the blathering I did in Keyboards over Terminal Server, where the way that keyboard layouts on the client side are picked up and added in a non-permanent fashion on the Terminal Server.

    The behavior DrPizza describes give some insight into how that is accomplished -- by using the KLID value without picking up the language information from the HKL itself.

    So that takes care if the first part of the question (what gives?) though unfortunately there is no way to stop other than creating a custom keyboard in MSKLC that you put on both client and server, based on the language you want the server to pick up....

     

    This post brought to you by(U+09fa, aka BENGALI ISSHAR)

  • Sorting it all Out

    If the problem is bad enough, we should probably look beyond the workaround

    • 0 Comments

    Over in the comments section of The keyboard does not do what I tell it to!,Maria asks:

    I have gone through all the comments in this blog, still can not solve my problem. My problem is almost the same as Kate's. When I type / , it shows é, when I type ? (shift+?), it shows É. I tried that Alt + Shift many times, suddenly I got / and ?. But when I open another file, same problems come again. And the question is I don't know how I made my last time successful. I guess that was just a coincidence.

    Please help me!

    Thanks

    Now I don't want to knock workarounds, as they can be very handy. Truly.

    But in this case it looks like there is more going on here, so we should look a little deeper to see if what is going on can be determined. 

    Looking at what the ALT+SHIFT does for a moment, it switches the keyboard layout to one of the other layouts that are in the interactive user's input language list.

    The fact that users often don't see the language switching kind of implies that the language bar is not visible, or at least is not providing helpful information....

    So let's take a look at the Language Bar. First we go to Regional and Language Options, in that middle tab and hit that button:

    You will likely see two or more keyboards listed there in that next dialog:

    Certainly I expect that Maria would see this, since the ALT+SHIFT switching worked at least once.

    And there may even be more than two -- note how she mentioned she had hit the keystroke combination many times....

    You may want to delete any layouts you are not using from the dialog.

    Let's deal with the other issue, if at least two keyboards are not needed.

    And now since it sounds like new processes are not getting the right layout by default -- let's fix up that process default choice in that very top dropdown:

    Make sure it is set to the one that you want for the default.... 

    And now let's hit that Language Bar... button and deal with the fact that the Language Bar wasn't visible:

    Aha, the list was intentionally made not visible -- how did that happen?

    Ah well, easy enough to solve -- hit that first checkbox, and now the language bar will be there for when things shift.

    The ALT+SHIFT workaround is fine for when you accidentally switch to a known layout that you have on your list -- but when the results are entirely unexpected, its good to try and figure out what might be configured inclorrectly....

     

    This post brought to you by é (U+00e9, aka LATIN SMALL LETTER E WITH ACUTE)

  • Sorting it all Out

    There is more to being an OEM for Windows than having the coolest hardware

    • 0 Comments

    Some of you may have seen Joshua Allen's Our Newest Vista OEM: Apple from Monday, which caused a little stir over in Mary Jo Foley's neck of the woods in her post (The happiest Vista customers: Mac users?).

    Now I happen to love my MacBook Pro and have been petty clear on that since my first blog about it (The Dell laptops have a new neighbor, who says hello), and though I was not initially going to install Vista on it, investigating a reported bug (Boot Camp 1.3 and MSKLC (also 1.3) -- excitement, enjoyment, and a wrinkle or three) caused me to install both 32-bit and 64-bit Vista onto the machine, and ironically finding that even Vista felt that my Vista experience was better on the top of the line Mac than on my top of the line Dell (ref: A tiny bit closer to the top of the line).

    I have done all my recent presentations on the MacBook Pro, I find it easier to travel with, and once I installed Leopard (ref: They say a leopard can't change its spots, but I upgraded anyway!) I found myself enjoying that experience too.

    There have even been occasions where the hardware has helped me prove a point, like how I proved my point in Detecting ALTGR can only hope to work when ALTGR is in fact there.... with Detecting ALTGR fails when ALTGR isn't there (Just Czech-ed out in Word 2007). :-)

    Look, my MacBook Pro rocks. And Leopard rocks. And Boot Camp rocks. I sincerely believe it is often as better Vista machine than any of the machines I have running Vista.

    But that is not what makes Apple an OEM for Windows.

    OEMs for Windows have a lot of other important qualities, like

    • They have Dedicated TAM (Technical Account Manager) resources at Microsoft who help assist with issues and escalate them
    • They bundle Windows with their hardware -- they don't just make it easy to install when you buy it separately
    • They are the first line of support for customers who bought Windows through them (which is why the TAM thing is so incredibly useful, for escalations!)
    • They don't tend to do as much public back-biting of Microsoft since they work together as partners

    and more.

    But anyway, you get the point, probably.

    It is obvious that there are some issues to work out here first. Somehow.

    Because being a Windows OEM is much more involved than just having the best hardware for Windows.

    In fact, that is not really a requirement at all, though it is one important aspect that could make an OEM a really good OEM.

    So Apple, to put it simply, has got the goods here.

    And they could probably be a kickass and cool OEM if they wanted to be.

    Some further assembly would be required before that package could be delivered, though....

    (More on the OEM thing here!)

     

    This post brought to you by(U+3250, aka PARTNERSHIP SIGN)

  • Sorting it all Out

    Tracking down problems with the 102 key on an Acer Tablet with the UK Extended keyboard layout?

    • 7 Comments

    I wish I was given the hardware budget so that every time a bug was reported in some hardware, I could get it, bring it in house, and figure out the bug.

    I think that would be very cool. :-)

    Over in the Suggestion Box, Mike asks:

    For some months, the \ key on my Acer Tablet's UK-keyboard has not worked (it's between left shift and z, as expected). At first I thought the keypad was broken, but I had that replaced. It still doesn't work. So I tried to remap the keyboard using tools like MSKLC or KeyTweak. Interestingly when I test that key in these apps, it works perfectly.

    I loaded the UK-Extended Keyboard layout into MSKLC, noting the following:

    1. even though the \ registers when I tapped it without a layout loaded,now it fails when I do have a UK (extended or not) layout loaded
    2. if I "Test Keyboard Layout" with UK-Extended then the key works (in both shift states)
    3. The Validate Layout log says : "    WARNING: '\' defined on OEM_5 (Base) but not defined elsewhere. This key may not be present on all keyboards."

    I'm stumped. Why isn't Windows (XP SP2) paying attention to this key? For now I have remapped my F9 key to act as my \ using KeyTweak.

    Now I will start by saying that I cannot reproduce the bug in question on any of my hardware running XP SP2 or Server 2003 or XP x64 or Server 2003 x64 or Vistas.

    (Though both #2 and #3 above are by design and expected!)

    But I believe there is a genuine issue here, and the fact that I have no Acer Tablet with a UK keyboard layout to verify anything on is not going to dissuade me from taking about the issue a bit here, in the hopes that either Mike or someone else with an XP SP2 on an Acer Laptop with a UK keyboard layout (one containing a 102 key between the Left Shift and the Z) could maybe try out....

    First we'll look at the key in MSKLC with that layout loaded up:

    and then we will look at the key in the "All Shift States" view:

    Now MSKLC is very scan-code anchored, pretty much relying on that good old SCAN CODE 56 to identify where the 102 key is (by using the map inside the layout to map the scan code to the virtual key), and the VK value to identify the keystroke being hit.

    And don't ask me why this keyboard decided not to use VK_OEM_102 for the freaking key, that just seems wrong to me.

    So the first and most important thing to do is to see what happens when you use the key outside of MSKLC.

    Maybe we could take the code from Handling [Unicode] input in the console and use it to type that 102 key and see what the results are -- both scan code and virtual key. Make sure you have the UK extended keyboard selected when you try it.

    Because it seems like there might be some kind of hardware issue, with the key on this particular keyboard not always consistently working as one would expect, if the key does not appear to work correctly.

    Taking a step back and looking at all of the keyboards built into Windows, the only ones that do not use VK_OEM_102 here are the UK Extended keyboard and the three Inuktitut keyboards. Makes me wonder if that is connected to the problem, too....

    So maybe it is the fact that the key is not mapped to the VK_OEM_102 key -- perhaps the answer is to save the file to a .KLC file,and change the following line:

    56 OEM_5  0 005c 007c -1 -1 -1  // REVERSE SOLIDUS, VERTICAL LINE, <none>, <none>, <none>

    to

    56 OEM_102  0 005c 007c -1 -1 -1  // REVERSE SOLIDUS, VERTICAL LINE, <none>, <none>, <none>

    and build that one and install it to see if that makes a difference....

    Anyone able to repro the bug on their hardware want to give this a try? I am very curious about this, and wishing there was an easy way to find out who within Microsoft might have this hardware to try things out!

     

    This post brought to you by | (U+007c, a.k.a. VERTICAL LINE)

  • Sorting it all Out

    There is no E in MUI, even if you pronounce it MOO-EE

    • 3 Comments

    This guest blog is written by Erik Fortune, the development manager for MUI.

    He gave a tutorial presentation at the 31st Internationalization and Unicode Conference (IUC) entitled Writing Win32 Multilingual Applications Using the Windows Vista MUI Technology, in which he mentioned he'd be posting some information/resources here.

    I have to mention that Erik is someone whose office I am unable to walk by without him having some relevant story from his past, but he did draw a blank at coming up with a story for the post.

    So instead I will put up his picture, which as they say is always worth 1000 words (in this case the 1000 words he did not give me!):

    Erik Fortune

    When he doesn't have a story, he usually has random music to play, some if which I enjoy and some of which horrifies me. But I wasn't going to try to attach a song to the page either. :-)

    Anyway, without further delay, let me present that guest blog post!


    First off, I’d like to apologize for the delay in getting these links posted (and for the lack of content for Michael’s weekend readers).  The links have actually been ready for a long time, but we’ve been waiting on the MFC sample code and for me to write something to accompany them.    We’ve decided to stop waiting and just post the code when it’s ready.  It’ll probably take even longer for me to write something interesting1.

    I’d also like to thank everyone who attended for your questions and suggestions.  Here in MUI Central Command, we’re trying to figure out how to fit them in both functionally and schedule-wise.

    Finally, the slides on the conference CD are out of date.  If you need to refer back to the presentation, please pull the slides from the “late presentations” section of the Unicode website.

    And now for some links to more detailed information on various things discussed in the tutorial.

    MUI
    Start off with the "Multilingual User Interface" section on MSDN :  http://msdn2.microsoft.com/en-us/library/ms776201.aspx

    Sample MUI Application
    The Windows Vista SDK includes a sample MUI Application that demonstrates many of the techniques covered in the tutorial.   Documentation here:  http://msdn2.microsoft.com/en-us/library/ms776235.aspx

    Indirect Strings
    Prior to Windows Vista, it was quite common to store localized strings in the registry, .inf files and so forth.  That leads to all kinds of problems for multilingual systems or distributions, so starting with Windows Vista we recommend the use of MUI indirection.   MUI indirection replaces hardcoded localized strings with references to strings contained in MUI files.

    A discussion of the use of MUI indirection for registry stings, shell shortcuts and verbs, MMC snap-in names, service names and much much more can be found here:
    http://msdn2.microsoft.com/en-us/library/ms776232.aspx

    Event Logs
    In the XML  Instrumentation Manifest that describes your events:

    • Specify the resource DLL that holds your localizable strings.
    • Define a string table containing values for the localizable strings.
    • Refer to the string table in your event descriptions

    The Message Compiler (mc.exe) uses this XML event description to produce header and localized binary resource files.

    As you might expect, there are lots of details.   You’ll find much more information, including examples, in MSDN:
    http://msdn2.microsoft.com/en-us/library/aa382690.aspx

    Group Policies
    Windows Vista uses XML for group policy descriptions.   Language neutral content in “.ADMX” files refers to localized content defined in “.ADML” files, which live in subdirectories that follow MUI naming conventions (e.g. “%windir%\policydefinitions\de-DE\Policy.adml” contains the localized German strings for “Policy.admx”).

    You’ll find overall documentation for using and managing group policy at:
    http://technet2.microsoft.com/WindowsVista/en/library/02633470-396c-4e34-971a-0c5b090dc4fd1033.mspx?mfr=true

    The schema for ADMX and ADML is described at:
    http://msdn2.microsoft.com/en-us/library/aa373476.aspx

    And you’ll find an example of creating a custom group policy (including localizable strings) here:
    http://support.microsoft.com/kb/918239

    WMI
    A WMI provider consists of a Managed Object Format (MOF) file and a DLL with provider logic.   Localizable resources are marked with the “amended” qualifier in the MOF file.

    Documentation for localizing WMI class information can be found at:
    http://msdn2.microsoft.com/en-us/library/aa392276.aspx

    MFC
    The MFC helper function is still not ready.

     

    1 - Due to brain-freeze when I need to blog on a specific topic and inability to turn off my inner editor, which are two of the reasons I stopped blogging on my own.   The third is that it became counterproductive – I started blogging as a way to vent but eventually wound up searching out things that pissed me off so I’d have something to write about.   Not exactly the most cunning of plans.


    Every visible character in Unicode supports MUI in general and this post in particular; the invisible ones are still evaluating the technology

  • Sorting it all Out

    How many versions does a bug have to exist before backporting the fix can't be successfully argued?

    • 7 Comments

    Some people may recall the blog that represents one of my favorite bug titles, namely Romanian keyboard is wrong, Wrong, WRONG!, in the blog entitled The Romanian keyboard layout on XP is the brokenest layout of all.

    That keyboard, and the various changes that were proposed to it in Vista, really did stretch the keyboard stability policy to the absolute limit.

    On the one hand, we never change keyboard layouts, ever, even if they are completely wrong and honestly even if they are completely stupid.

    However, on the other hand, the reason it is freaking broken is that this policy was violated rather severely in the port from Win9x to the NE platform. Most of the proposed fixes were to recover from that regression, one that had existed in every 32-bit and 64-bit version of NT-based Windows that had ever shipped.

    And on the one hand, we cannot change the cedilla-below characters to be comma-below characters because that too would be a violation of the stability policy.

    However, on the other hand, the intent of the keyboard layout was clearly to represent the characters used by the Romanian language, which has at this point been completely recognized to need comma-below characters, not cedilla-below ones.

    Four entirely independent arguments, the pairs of which blatantly contradictory and all of which I could have seen argued either way.

    In the end, the first two were resolved by making the change due to the clear and obvious regression, and the last two were resolved by not making the change, since doing so would leave no solution for non-Unicode applications since the characters were in no code page.

    Okay, that is it for the review. Now to the new twist!

    The recent mail that came in:

    If this is not too late, I would like to ask for fixing the dead keys issue in the Romanian keyboard layout for Windows XP, to be included in SP3. I mean the old and only one Romanian keyboard layout in XP, which was later called "Romanian (Legacy)" in Windows Vista (but this has nothing to do with Vista's added layouts, or layout names change, or anything else). It should be just a fix for an ancient bug, suitable for inclusion in a service pack for XP.

    Boy, this one keyboard sure does pile up a lot of grief, doesn't it? :-)

    To be honest, I have no idea what they will do here. I truly don't.

    I'm actually not even sure what my recommendation would be, if someone asked (and no one really has, at least not officially).

    I could argue this one either way as the points on both sides are valid and I won't be able to claim disappointment no matter what side "wins" the battle.

    Out of idle curiosity, how would you choose for this one?

    Pretend it was up to you with all of the issues and pressures, if the question were put to you.

    What would you do?

    And why?

     

    This post brought to you by Ș (U+0218, a.k.a. LATIN CAPITAL LETTER S WITH COMMA BELOW)

  • Sorting it all Out

    When yesterday's workaround becomes tomorrow's potential solution...

    • 7 Comments

    From the introduction to The More Than Complete Hitchhiker's Guide:

         The story grew in the most convoluted way, as many people will be surprised to learn. Writing episodically [as for a radio program - MSK] meant that when I finish one episode I  had no idea what the next one would contain. When, in the twists and turns of the plot, some event suddenly seemed to illuminate things that had gone before, I was as surprised as anyone else.
         I think that the BBC's attitude toward the show while it was in production was very similar to that which Macbeth had toward murdering people -- initial doubts, followed by cautious enthusiasm and then greater and greater alarm at the sheer scale of the undertaking and still no end in sight....
    ....
        In the fall of 1979, the first Hitchhiker book was published in England, called The Hitchhiker's Guide to the Galaxy, It was a substantially expanded version of the first four episodes of the radio series, in which some of the characters behaved in entirely different ways and others behaved in exactly the same ways but for entirely different reasons, which amounts to the same thing but saves rewriting the dialogue.

    The first part of this quote is quite relevant to the blog you are currently reading.

    The second part of this quote, however, has nothing to do with this blog, but more than a little bit to do with this Blog, if you follow my meaning. I will talk about that another day, and thus that other unrelated point about this Blog will be covered not in this blog but in another blog. But it literally came right after the first bit so I included it anyway because I think it reads good.

    Sometimes a post will inspire another post so it will include the link.

    Other times I will write a post, realize the connection to the earlier one afterward but before posting, and I will add the link.

    From your point of view (as the reader), the effect is the same, though for me  as the writer the first method is easier since it saves me editing the second post after the fact. Which is what the third bit in the quotes is there for.

    If you are a regular reader then you may concur with all of this. Or you may not. I honestly don't give a fig, and not just because I have no figs, but because I don't write for the kind of people who would tend to not agree with how I write since it is not really something anyone knows about other than reading what I write about it. Disagreeing with it thus makes one simply disagreeable, and while I support everyone's right to be wrong, I do it in a more passive way, and I certainly don't write for them in particular.

    A hazard of reading Douglas Adams is that you find yourself writing a bit like him, only less entertaining. Sorry about that!

    Anyway, on to the topic of this blog....

    I have had many occasions to point out the problems with SQLCLR, that whole notion of the CLR within SQL Server, in the past. Like in posts such as String.Compare is for sissies (not for people who want SQLCLR consistency) and Not all in sync quite yet (aka SQL and the CLR and Windows and .NET), where I point out that the fact that SQL and the CLR both have very firmly embedded architectural notions of how collation should work that do not match (more or less just about all of them) and at time can openly disagree (e.g. a Windows-only culture on Vista inside of a SQL Server stored procedure).

    And I have also talked about the biggest problem in deciding about how best to be consistent or compatible really depends on what one is trying to be consistent with and what one is trying to be compatible with. As I pointed out in Compatibility is inconsistent; consistency is not compatible..., defining this is a crucial first step.

    If you don't have this defined and later someone has to try to describe the behavior (as documentation writers and support personnel are often required to do), there is no easy consistent way to define why things behave as they do.

    So they do their best to make Microsoft not look dumb, when in a way we kind of were, since we did not plan ahead enough in the design to know how this should go.

    Hell, I think we just released LINQ and with not much more in the way available that explains how any of this works. And that makes good engineering look pretty doubleplusungood, in retrospect -- whether it is true or not.

    But in the midst of stewing about this, and after eating what can only be described as entirely too much five-star turkey panang curry left over from Thanksgiving, I suddenly found myself thinking about the static versions of CompareStringW and LCMapStringW that Jet Red >= 4.0 and and SQL Server >= 7.0 both use that I have written about in that weird unofficial undocumented sense in a past life and Lee Woods wrote about more officially up on TechNet in the article entitled Microsoft Jet 4.0 Sorting APIs: DBCompareStringW and DBLCMapStringW.

    And then add a helping of the explanation I gave for synthetic or Windows-only cultures earlier this very month in Predictably (in retrospect), aka Where Wild^H^H^Hindows-Only Things Are, aka SHORT [on ]TIME for a LONG TIME.

    And suddenly a long-term solution that would let the CLR within SQL Server do its work with SQL Server semantics became more obvious -- it could use that whole synthetic model for collation and have the CLR hosted by SQL Server depend on the SQL Server doing the hosting. So that queries and code would get the same results!

    What better thing to be consistent with? What better thing to be compatible with?

    Suddenly the workaround for a data management issue (the original reasons for Windows-only cultures, as I discussed previously), becomes a potential compelling architectural solution for the aforementioned SQLCLR compatibility issues, LINQ/CLR collation inconsistencies, and maybe even a more sensible/scalable solution for Mono than the one I naively suggested over two years ago in My own personal thoughts about collation in the Mono project.

    Now would it be as easy to do as I imply here? Of course not. But it does allow the problem to be a tractable one, which is decidedly not what it is, today (which is why we keep shipping it, msybe?).

    When yesterday's workaround becomes tomorrow's potential solution to problems, you know you were doing something right.... :-)

     

    This post brought to you by (U+3007, a.k.a. IDEOGRAPHIC NUMBER ZERO)

  • Sorting it all Out

    'Funny' blogs, 'Funny' Spanish and 'Funny' standards

    • 0 Comments

    Overheard from a TV show that played originally on Friday:

    She did say that the spoke "funny" Spanish, so maybe they weren't native speakers.

    Not the right Law & Order former ADA, but what with Crossing Jordan off the air, Women's Murder Club is on my short list of programs I'm watching, and not just because of Angie Harmon (my third-favorite former ADA between the original and SVU).

    Overheard on the Unicode List from James Kass:

    There are many things I like about the Unicode Standard, but assigning a character and then telling people they mustn't use it isn't one of them.

    Well put, James. I am feeling like there are too many people these days who never learned about don't start none, won't be none!

    To which Doug Ewell replied, tongue firmly embedded within cheek:

    󠀁󠁥󠁮I agree.󠀁󠁿

    Nothing like making a point by example! 

    I'll talk more about this later today, people are still talking lots on the list....

     

    This post brought to you by 󠀁, 󠁥, 󠁮, and 󠁿 (U+e0001, U+e0065, U+e006e, and U+e007f, aka LANGUAGE TAG, TAG LATIN SMALL LETTER E, TAG LATIN SMALL LETTER N, and CANCEL TAG)

  • Sorting it all Out

    The etiquette (such as it is) of social networking -- like I would have a clue?

    • 8 Comments

    Perhaps not the least important blog ever posted here, but likely in the top ten; I'd recommend skipping! 

    Kind of a follow-up to The downside to being anti-social is....

    In the world of LinkedIn, it is really on the asker -- they have to put themselves out there and assert the professional relationship, in order for there to be any chance of it being created. And it is not visible to anyone else until/unless the askee approves of the connection.

    Generally speaking, personal relationships are not a huge part of it, though professional for many people there extends to conferences and quasi-professional connections as well. Which do make up a big part of what passes for personal relationships among geeks.

    I am the technical VP of a development SIG -- is a member of that SIG in a professional relationship with me?

    How about someone who watched me speak once?

    Would them asking me a question during the presentation change the answer? How about if they asked after?

    I guess I am usually more inclined to give someone the benefit of the doubt in such cases -- no sense turning someone down, there is a karma thing involved here, I think. :-)

    Exception, sometimes I get requests for connections from people like this guy who has no direct connection in LinkedIn to me or anyone I connect to, but has third level connections through like 41 people I am connected to. I can't recall him, which suggests one of the following possibilities:

    • Early onset ALZ on my part;
    • I was really drunk when I met him and don't remember it
    • He comments here under some other name that he thoght I'd know
    • He tries to connect with everyone who connects to those he connects with, whether he knows them or not

    The first one is a really depressing thought, and the second is not much better, the third is perhaps a reason (see below), and the fourth isn't, in my book. But this is an example of one I said no to for now...

    Hell, I used to put my email address on my slides, and tell people that anyone who would sit there and listen to me blather for an hour is someone I'd be willing to take a question from -- this seems like a natural extension to the previous policy!

    The mail notification for LinkedIn has appeared to be flaky at times (I am not told of someone being an asker and do not find out until the next time I log in, which could be weeks later. And often is, at least for me, YMMV!).

    Then if you contrast that with facebook, lots of interesting differences seen to emerge.

    The asker appears to have much less to worry about with default settings of people in a shared network -- the connection seems to be added as soon as they assert it. It takes an explicit act of the askee to break the connection. Now this is only the default setting and can definitely be configured, but how many people really configure it? Some people I know, sure -- but we are all geeks so we aren't typical!

    Personal relationship connections seem much more common -- I have found myself reunited with folks I have lost touch with for years. Listing them alongside the people who I just met last year is fine for me but I have yet to fully grok what it makes me look like in the "snapshot description" of myself. Maybe it doesn't say anything. :-)

    And them professional relationships that are several professions past seem more fluid and dynamic, with actual conversations seeming more common than with LinkedIn. Again, YMMV and probably does. It is just what is seems like.

    The mail notification has also sometimes seemed flaky, but I haven't really analyzed it too closely.

    When you think about the difference in asker vs. askee, the fact that doing nothing in facebook leaves the connection there until one explicitly kills it does cause there to be another dynamic -- one has to either quickly kill it off or one will likely accept it -- the whole "let it sit there, no hurry" feeling that LinkedIn gave seems missing here.

    Another good reason to change settings, mentioned to me recently by a friend from years ago (we recently reconnected via a classmates.com reconnection!):

    I was on Facebook briefly, but have since canceled my account.  I am not a big
    MySpace/Facebook person.  Good for networking, not so good when exes play headgames.
    So, now I try to just operate in the real world. 

    She makes a good point -- and if not a reason to drop an account, it is certainly a reason to consider visiting those settings!

    In the end, I see myself less involved with these things over time. I mean, some people love this (supposedly Robert Scoble has over 5000 "friends" in facebook and I'm told there are actual groups there suggesting he needs to be a little less involved!).

    But for me it is just a means to an end. I want to be out there, so that people who are looking for me can find me.

    And occasionally, I want to find an old friend from networks long past.

    Even in a world like facebook that only lists one of the high schools I went to, and not the one I graduated from (thus making classmates.com so important, with old friends trying to drum up a reunion for the now-defunct school!).

    But seeking out glory in a social network seem even more flawed than seeking out glory in real life since it is virtual (and both are flawed since glory comes from somewhere different).

    The etiquette of it all is beyond me, so if I accidentally step on a toe trying to "friend" me then I apologize, as I honestly am not trying to.

    Being connected is just the first part -- as I mentioned to friend Mike the other day:

    Sometimes a connection is flattering, esp. if it is someone you admire, but it doesn't mean much beyond the initial moment. After that, it is the strength of the relationship that matters. But the moment is nice, I guess....

    How much time do I spend communicating with the (as of last night) 41 people I am connected to? Not much -- in fact with just a few exceptions that were genuine reconnects (and which probably would have been anyway even without the facebook/LinkedIn medium in which they occurred), I am really just talking to the people I talked to before.

    Maybe that is bad etiquette too, but my friend was right about the strength of operating in the real world. :-)

    On a completely unrelated note, I missed seeing Blues Traveler at Showbox, a whoe that is probably still going on right now as this post is going up live. This was pretty unfortunate, and I am going to have to see if I can catch them somewhere else on their current tour. If any regular readers saw the show, what did you think?

     

    This post brought to you by 𝌏 (U+1d30f, aka TETRAGRAM FOR DEFECTIVENESS OR DISTORTION)

  • Sorting it all Out

    I don't do dishes, GDI doesn't do supplementary characters

    • 0 Comments

    Everyone has a certain set of tasks that they simply do not want to perform.

    Even if it seems like the sort of thing that others might (right or wrong) expect them to do as a part of their job.

    Like some housekeepers don't do windows.

    And some secretaries don't get coffee.

    And I don't do dishes.

    And GDI on Windows doesn't do supplementary characters.

    Over in the microsoft.public.win32.programmer.international newsgroup, semi-regular reader Christian Kaiser asked:

    Possibly I'm missing something, but I did not find any documentation on how to use GetCharABCWidths() with UTF16 surrogate pairs (additional planes).
    Is there any way to use that API (or the like)? The API gets UINT instead of TCHAR, so maybe by shifting the high surrogate and 'or'ing with the low one?

    Christian

    But Christian isn't missing anything here -- the only way that GDI can ever handle supplementary characters is as glyph ID values; it cannot handle either surrogate pairs or UTF-32 encoded Unicode Scalar Values.

    Kind of unfortunate for the whole family of GDI functions like GetCharABCWidths, since only some of them will also take glyph ID values. And although all supplementary character processing does through Uniscribe, there are many pieces of the supplementary ranges that do not require any complex script processing other than this particular requirement, which just means that some functions have no supplementary equivalent.

    Because GDI wouldn't know a supplementary character if that character walked up and bit it in the ass (thus inspiring the post's sponsor)....

     

    This post brought to you by 𝌽 (U+1d33d, aka U+d834 U+df3d, aka TETRAGRAM FOR CLOSED MOUTH)

  • Sorting it all Out

    We didn't split up, because we were in Japan (aka They have an opening that you might fit)

    • 2 Comments

    No, this is not a post about a past relationship! 

    The question that came up yesterday was:

    Hi.

    Following lines of WSF script generate script error.  The character in the string is Katakana letter Pe U+30DA

        formatline = "first=ペ"
        arr1 = Split(formatline, "=", 2, 1)

    The error that is returned:

        test.wsf(14, 2) Microsoft VBScript runtime error: Invalid procedure call or argument: 'Split'

    Failing case is introduced when standards and formats on my Vista OS is Korean.

    I suspect that this function should have used binary comparison where it does not fail:

        arr1 = Split(formatline, "=", 2, 0)

    Both function calls work fine when user locale is set to Japanese, matching the Language of the character.

    Why the call with textual comparison is treated as illegal?  What are preferences between textual and binary comparison?

    Thanks.

    Now the person who asked the question is someone I have worked with before. I like his instincts.

    Anyway the former script dev pointed out the basic things to consider here:

    A possible source of the problem is the encoding of the script file. All bets are off if your WSF file is not Unicode.

    Assuming that your script file IS Unicode:

    Text compare uses current locale information for special text processing when you use TextCompare, so it’s not too surprising that anomalies arise when the text and the locale don’t match up.  Using SetLocale(“ja”) may make it work as expected. Unfortunately, it looks like the code has some inconsistencies, using system locale for certain processing and the current engine locale for others, so setting the locale may not make it work.

    It looks to me that this should work without errors, though. A bug should be filed.

    Both of then are basically right here!

    In this case, there are two important issues here, both of which he pointed out in his message:

    1. The fact that this call ever fails is a bug -- it should not be happening;
    2. The call should be done with a binary comparison since there is no "linguistic" sense of the equals sign that would make sense here for comparison purposes.

    So both of them are batting 1000. :-)

    It is interesting how often valid globalization bugs are found in the context of usage that is essentially incorrect.

    There is an interesting challenge to send these two messages such that people will not think you are the jerk who takes someone reporting a bug as an opportunity to slam on the person doing the reporting, if you know what I mean....

    Not so much in this case (since it was someone else's script bug and he was just the person who was tracking the down the failure found with a different language configuration on a test machine) but it is a pretty common scenario, probably more common with people reporting the error with their own code. And an important skill to master.

    This is a relevant point for you, the reader, as there is yet another opportunity for a job in my former team that deals with these kinds of issues!

    They are looking for another tester -- an SDET, to be [recise.

    Kieran mentioned the position in her recent post entitled Shameless self-promotion, and now that I have somewhere between 7 and 8.5 people (depending on how you count!) who have come to work for MS after reading this blog I have to consider the non-zero percent probability that the person who applies for and gets this job might be a regular reader. And this can be a very valuable skill to have for this position in particular. :-)

    Both Kieran's post and the job description it links to have hints about future functionality that are much broader than I would be posting here (it's their team, and that gives then a lot more leeway on such matters!), for people who like to watch that kind of thing. Some exciting stuff....

    If you end up interviewing be sure to drop me a line, maybe I could get you a Limonata or something. :-)

     

    This post brought to you by = and(U+003d and U+30da, aka EQUALS SIGN and KATAKANA LETTER PE)

  • Sorting it all Out

    Another face of internationalization

    • 2 Comments

    There are a lot of different aspects of internationalization that I cover here.

    From the things in which I am very knowledgeable to the things in which I am interested or even curious, I cover a lot of ground.

    Though there is one space I generally stay out of.

    Online advertising.

    Now I admit that the fact that I do not talk much about this area is the innate fear of being perceived as a salesman.

    I mean, since I'm not one and all.

    And I don't want people to mistake me for one, since I hate being sold to, myself.

    But the other day over in the adCenter Blog, Catherine and Nicholas did a guest post entitled Do Your Recherche: Advertising in the French Canadian Market. This is an area of internationalization that I do find fascinating because of the many interesting technical and customer issues involving ways to approach other markets, other languages.

    It is a localization problem that is even more complicated than software localization, because of the additional issues such as not exactly being invited. And the line between helpful resource and assholic spammer is one that is way too easy to cross.

    Which might get right down to why, despite the fact that this is an area I find fascinating, I do not really tend to cover much. Or at all, really. :-(

    I'll try to work on that and talk about interesting issues from time to time -- particularly in the areas where I feel like I can add the most value (e.g. in assessment, scenarios, and justification of the effort, etc.).

    I may even talk about markets beyond what people might usually be thinking about.

    And every once in a while I'll link to a post I find interesting, like I did above. :-)

     

    This post brought to you by(U+155c, aka CANADIAN SYLLABICS WEST-CREE FWAA)

  • Sorting it all Out

    Sometimes the words are more important to the singer/songwriters, too

    • 2 Comments

    I had reader Tamara ask me via the Contact link whether I only was willing to handle song lyric questions from people I knew.

    And if not she had a song she wanted to ask about....

    To be honest it had never come up before, but the song she had in mind was one I remembered from way back when it first came out, so I decided to say what the hell and talk about it. :-)

    The song?

    The Canadian band Len's "one hit wonder" song Steal My Sunshine.

    The song had many different versions (there was even an import CD somewhere in my collection with four different versions of the song on it!).

    The source of the song is kind of a nice story.

    Marc Costanzo, one half of Len, wrote it back in 1996, after he and his sister (Sharon Costanzo) were going through some pretty tumultuous times. The two of them had a really bad fight, and Sharon wasn't talking to Marc at all. Marc had no idea how to fix things up or what to say, and he went home and wrote Steal My Sunshine to try and tell Sharon (who really is his sunshine) how he felt -- how much he really needed her in his life.

    If you look online you'll see a whole bunch of non-identical attempts at the lyrics. I'll put up my own from my listening to the aforementioned four versions of the song (Marc lines in PURPLE, Sharon lines in RED):

    Tim (spoken): Hey Matt.
    Matt (spoken): Yeah Tim?
    Tim (spoken): Hey, you talked to Marc lately?
    Matt (spoken): Uh..haven't really talked to him but..he looks pretty uh..down.
    Tim (spoken): He looks pretty uh..down? (laughs)
    Matt (spoken): Yeah, well maybe we should cheer him up, then.
    Tim (spoken): What do you uh..suppose we should do?
    Matt (spoken): Well does he like butter tarts?

    I was lying on the grass on Sunday morning of last week. Indulging in my self-defeats.
    My mind was thugged all laced and bugged all twisted wrong and beat, a comfortable three feet deep.
    Now the fuzzy stare from not being there on a confusing morning weak impaired my tribal lunar-speak.
    And of course you can't become if you only say what you would have done. So I missed a million miles of fun.

    I know it's up for me
    IF YOU STEAL MY SUNSHINE
    Making sure I'm not in too deep
    IF YOU STEAL MY SUNSHINE
    Keeping versed and on my feet
    IF YOU STEAL MY SUNSHINE

    Tim (spoken): Chad. Come here, come here, come here.
    Chad (spoken): Wow, look at her.
    Tim (spoken): I know...
    Chad (spoken): Wow... I've never seen Sharon look so bad.
    Tim (spoken): I did once before... but this is pretty bad.
    Chad (spoken): Yeah... What do you think she got up to last night?
    (both Tim and Chad laugh)
    Tim (spoken): Well... I... Sharon! I love you!

    I was lying on the bench slide in the park across the street l-a-t-e-r that week
    My sticky paws were in to making straws out of big fat slurpy treats, an incredible eight foot heap
    Now the funny glare to pay a gleaming tare in a staring under heat Involved an under usual feet
    And I'm not only among but I invite who I want to come. So I missed a million miles of fun

    I know it's up for me
    IF YOU STEAL MY SUNSHINE
    Making sure I'm not in too deep
    IF YOU STEAL MY SUNSHINE
    Keeping versed and on my feet
    IF YOU STEAL MY SUNSHINE

    I know it's done for me
    IF YOU STEAL MY SUNSHINE
    Not as some and hard to see
    IF YOU STEAL MY SUNSHINE
    Keeping dumb and built to beat
    IF YOU STEAL MY SUNSHINE

    My Sunshine
    IF YOU STEAL MY SUNSHINE

    (repeat the last two lines until the song fades out)

    Now clearly some of this was probably written after Marc and Sharon managed to make up from the fight, and it would be great to fill in some of those details, too -- as there is a small amlount of distance between what we know and what the song says....

    And I do love the tare reference in the second verse -- and am pretty sure that is what it is, though most lyric sites assume that tear is the woukd there (as in to rip, not as in to cry). And not only because it makes more sense.

    In the meantime, I admit that I have a much easier time (when thinking aboiut the lyrics) identifying with some parts than I do with others -- because who of us can become if all we do is talk about what we would have done? It is a pretty inspired and determined statement of the need to make sure that in order to really feel like a human being that the most important step is to be a human doing.

    And Sharon and Marc clearly did manage to patch things up; I think I would have been minded to accept the apology too, were it being directed to me -- clearly there are times that the lyrics do matter -- when we are saying we're sorry....

    I now see the disadvantage of doing this sort of thing without having the long phone conversation -- there is no feedback system to see if I answered Tamara's question(s) about the song or if she had additional thoughts or insights herself!

     

    This post brought to you by ? (U+003f, aka QUESTION MARK)

Page 1 of 5 (63 items) 12345