Postings are provided as is with no warranties, and confer no rights. Opinions expressed here are my own delusions; my employers at best shake their heads and sigh, at worst repudiate the content with extreme prejudice, whenever it manages to appear on their radar.
This blog is unsuitable for overly sensitive persons with low self-esteem and/or no sense of humour. Proceed at your own risk. Use as directed. Do not spray directly into eyes. Caution: filling may be hot. Do not give to children under 60 years of age. Not labeled for individual sale. Do not read 'natas teews ym' backwards. Objects in mirror are closer than they appear. Chew before swallowing. Do not bend, fold, spindle or mutilate. Do not take orally unless directed by a physician. Remove baby before folding stroller. Not for use on unexplained calf pain.
A nice FLAIR (FLuid Attenuated Inversion Recovery) view from the not-too-distant past. Every abnormality you can see on this scan (and there is more than one!) is asymptomatic at present. Alongside is a picture of me walking the walls at Fremont Studios, a sign of a damaged brain.
Dmitry asked via the Contact link:
Hello Michael!As far as I understand, some wide char can be in only one of Unicode subranges listed e.g. at http://msdn2.microsoft.com/en-us/library/ms776439(VS.85).aspx, so its value determines its code page. But then why does WideCharToMultiByte needs the codepage parameter?!The question comes from practice: if I get some wide char string from somewhere with unknown codepage, how do I get MBCS analog for it? Even more, the string may contain chars from different codepages..It makes me thinking that Unicode (or its implementation in WinAPI) is not so universal if Unicode chars are not self-descriptive and need additional information about them..Thanks.Dmitry.
Sorry Dmitry, you are confusing apples and earmuffs on this one -- the Unicode Subset Bitfields are not connected to the Code Pages supported by Windows, at all really.
They really serve two different purposes -- the Unicode Subset Bitfields are a way that typography can use to group Unicode characters together based on Unicode subranges. Each character in Unicode is in one and only one of those subranges, and if you will note the definition of the various Unicode Subset Bitfields, some actually contain more than one of the Unicode subranges. This is very good since the OS/2 table of the font that contains those same Unicode range bits is Running a bit short on space and all. :-)
The Code Pages supported by Windows, on the other hand, are various subsets -- small groupings of characters that are each targeting a particular market or markets. They each define various mappings to Unicode, and Unicode characters can appear in more than one code page (e.g. all of the characters in ASCII are supported on most of them, and many of the letters in Greek are supported on code pages 1253, 737, 28597, and 932 under the "83" lead byte, among others. So there is no way to know what code page to use for the mapping!
Now if one was looking to find out the script(s) of various strings, I have mentioned the >= Vista GetStringScripts and the < Vista DownlevelGetStringScripts functions in the past in relation to the Mitigation tools for IDN security problems. But that isn't about the Code Pages supported by Windows, or strictly speaking the Unicode Subset Bitfields, either.
Thus the apples vs. earmuffs contrast. :-)
In the middle of Dmitry's note, one line in particular caught my eye:
Even more, the string may contain chars from different codepages.
Too true, that! But that is an argument in favor of the fact that code pages are really not enough -- Unicode is actually doing just fine here!
This blog brought to you by Α (U+0391, aka GREEK CAPITAL LETTER ALPHA, a letter of several code pages)
Regular reader Arun pointed out an interesting article to me:
Michael,Check out (http://www.infoworld.com/archives/emailPrint.jsp?R=printThis&A=/article/08/04/28/10-most-important-technologies-you-never-think-about_1.html) for the 10 most important technologies you never think about... it has Unicode at #1 (or is it #10, I'm not sure!)Btw, the 'Days left in office' in your sidebar spooked me until I realized you were referring to Dubya and not yourself!Cheers,Arun
I have to agree it is nice to see Unicode in the pole position of this list entitled The 10 most important technologies you never think about (Without these technologies our world would be a very different place).
The list is unordered, though since it is listed first and it is not first in alphabetical order, I am inclined to guess that mit might be first for a reason. :-)
The text goes:
UnicodeWe use computers for every kind of communication, from IM to e-mail to writing the Great American Novel. The trouble is, computers don't speak our language. They're all digital; before they can store or process text, every letter, symbol, and punctuation mark must first be translated into numbers.So which numbers do we use? Early PCs relied on a code called ASCII, which took care of most of the characters used in Western European languages. But that's not enough in the age of the World Wide Web. What about Cyrillic, Hindi, or Thai?Enter Unicode, the Rosetta Stone of computing. The Unicode standard defines a unique number for every letter, symbol, or glyph in more than 30 written languages, and it's still growing. At nearly 1,500 pages and counting, it's incredibly complex, but it's been gaining traction ever since Microsoft adopted it as the internal encoding for the Windows NT family of operating systems.Most of us will never need to know which characters map to which Unicode numbers, but modern computing could scarcely do without Unicode. In fact, it's what's letting you read this article in your Web browser, right now.
Kind of says most of it if not all of it. :-)
The full list is also interesting; take a look if you are curious about what else Neil McAllister put on this top 10 list....
This blog brought to you by 𐒉 (U+10489, aka OSMANYA LETTER SHIIN)
John's question was:
Experimentally, it seems that CultureInfo.GetCultureInfo() returns a CultureInfo object which has UseUserOverrides set to false. Is this always the case? I couldn’t infer from the documentation that this is actually guaranteed.Thanks, -john
This takes me way back to when Mike first wrote the code for GetCultureInfo (the link to his description is here, but don't bother clicking on it since the neither the blog nor the Blog are there anymore).
The problem was that CultureInfo objects are pretty freaking huge. And the cost to keep creating them (even creating the same one over and over again) was way too big. Since most of the time they were being created only for things like resource loading, where most of the properties weren't even being used.
In case this sounds familiar, it is something I previously mentioned as one of the problems with CurrentUICulture, here.
Anyway, it was pointed out that in many of these case, a single shared read-only instance would do just as well. And so that is what CultureInfo.GetCultureInfo returns: a cached, read-only instance of a culture.
Now from there, the issue of user overrides is an important one.
Because the notion of a read-only object which nevertheless can have its behavior changed by changes one makes in Regional and Language Options is kind of a stupid sort of read only.
In fact, as read-only goes, that behavior (to borrow from Cartman's lexicon) would really kind of suck ass....
So the decision was made to make the cached cultures returned by CultureInfo.GetCultureInfo always have the useUserOverride set to false.
I'll mention other interesting features of GetCultureInfo in another blog, soon....
This blog brought to you by ျ (U+103b, aka MYANMAR CONSONANT SIGN MEDIAL YA)
David asked:
Hi,Does anyone know how to setLocale in Jscript? It seems like JS assumes that everything gets localized in current locale.Also, how do we convert string “1,234” into double 1234 (taking comma into consideration)The reason I am asking this is that I am trying to resolve a globalization issue.I think UK locale tends to have “1.234,56” format for their currency while we have “1,234.56” for currency.If anyone can knows how this can be resolved would be great.The problem can easily be solved in VBScript:--There is a SetLocale function (I just use it to test)--And Cdbl() converts “12,34” correctly to 12.34 in UK Locale--Also converts “1,234” correctly to 1234 in US LocaleWondering if there’s a solution in JScript.Thank you very much!
Luckily, inestimable developer Paul was there with the best tongue-in-cheek response this month:
You can write your conversion functions in vbscript and call them from jscript.
JScript and JavaScript (aka ECMAScript) all have in common this particular lack of the kind of support for internationalization that people like me consider to be pretty important.
It is kind of fun when the lack is described in terms less likely to lead to diatribes about that lack, which are seldom placed so as to foster a solution.
Paul's answer, on the other hand, in light of the just sipped bit Limonata, just inspires a YOMANK from me. :-)
The situation is fairly unfortunate, given how much more ubiquitous ECMAScript is, especially for client side scripting in the browser, but also in general. But no one seems eager to jump in and see it enhanced at this point....
This blog brought to you by , (U+002c, aka COMMA)
The weirdness is easily noted if you try the following code in both .NET <= 1.1 and .NET >= 2.0:
static void Main(string[] args) { Decimal val1 = 0m; Decimal val2 = 0.0m; Decimal val3 = 0.00m; Decimal val4 = 1m; Decimal val5 = 1.0m; Decimal val6 = 1.00m; Console.WriteLine("0 → " + val1.ToString()); Console.WriteLine("0.0 → " + val2.ToString()); Console.WriteLine("0.00 → " + val3.ToString()); Console.WriteLine("1 → " + val4.ToString()); Console.WriteLine("1.0 → " + val5.ToString()); Console.WriteLine("1.00 → " + val6.ToString());}
The output in the console would be as follows in <= 1.1:
0 → 00.0 → 00.00 → 01 → 11.0 → 1.0 1.00 → 1.00==
and then as follows in >= 2.0:
0 → 00.0 → 0.00.00 → 0.001 → 11.0 → 1.0 1.00 → 1.00
Subtle difference, that -- but one that does seem more consistent -- and was an intentional "break" to compatibility for the sake of that consistency that only affects the "0" values.
Note that this has no connection to Insanity defined: In the real world -0 == 0, in Vista -0 < 0, and in Windows Server 2008 -0 ≮ 0 at all, or any of the collation mistakes there.
And it isn't connected with Decimal Negative Zero Representation from over on the BCLTeam blog, either.
Because we aren't dealing with -0 versus 0, we are dealing with 0 vs. 0.0 and so on. :-)
Though in a way we are talking about the same thing --- given that the goal of .NET here is to capture minute distinctions that keep exactly the same value no matter what -- since to most people in the universe
0 == 0.0 == 0.00 == -0 == -0.0 == -0.00
and so on.
And we won't even talk about the StrCmpLogicalW changes that differentiate between other things that are kind of the same, making
000001 < 00001 < 0001 < 001 < 01 < 1
This last part does seem a little inconsistent, huh? :-)
It may seem a little silly in the end to spend a lot of time keeping track of and sometimes even changing results of these edge cases.
Much Ado About Nothing, if you ask me. :-)
This blog brought to you by 0 (U+0030, aka DIGIT ZERO)
Rutger asked over in the Suggestion Box:
I was digging around in my fonts page, after converting our font support to logical font support (to stay in line with the java world). And I fond 4 fonts that seem to have a special meaning Global SansSerif Global Serif Global MonoSpace Global UserInterfaceWhat is the deal with these fonts? they seem to be col. ections of what font to use for what circumstance. They look related to winfx(the scheme name... http://schemas.microsoft.com/winfx/2006/xaml/composite-font)Are they new and only available on wxp with .NET 3.0 or so or can/should I use these as logical fonts??
These are indeed composite fonts that can be used with WPF, aka Avalon, aka Windows Presentation Foundation.
They can only be used by WPF but they do provide as configurable per-script fallback scheme that anyone can use (contrast this with Uniscribe font fallback, which cannot be changed).
I'll be talking about these composite fonts soon, so stay tuned in....
This blog brought to you by F (U+0046, aka LATIN CAPITAL LETTER F)
Apologies for the metablog post, though you knew something like this was coming. Feel free to skip it if you would prefer...
I am going to stop calling this a personal Blog.
As of the very blog you are reading right now.
In the end, it is simply an unavoidable reality.
You may have noticed (if you are the sort to scroll all the way down) the text at the bottom of every page, that looks like this:
© 2008 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement
We'll momentarily ignore how silly this looks in blogs from 2004-2007, of course.
And well also momentarily ignore that they are ignoring rule #14 in Cory Doctorow's 17 Tips For Getting Bloggers To Write About You:
Enough with the legal boilerplate. If your every page on your site ends with "(c) 2008 Paranoid Co Inc, all rights reserved. No part of this site may be reproduced without permission," then bloggers may just take you at your word and write about someone else's site. You don't need this kind of language -- your stuff is copyrighted the second you type it out, in every country that's signed the Berne Convention (that includes the US). Your overzealous lawyer is scaring away the bloggers who'll tell the world about your stuff.
because it is Microsoft's business if they want to insert their own copyrightness.
BUT you see you must be a full-time employee of Microsoft to be the owner of a blog on this site, and if Microsoft the company wants to be clear ab out themselves as the copyright holders of the content then I am not going to argue the semantics of whether or not it is a "personal Blog", since Microsoft is asserting ownership of the words.
Most of the content relates to the work I do either directly or indirectly, so no matter what I or anyone else says, it is a work blog, by and large.
The only distinction I will make is that:
My work is not exactly identical to my job
so if my management doesn't review blog entries before they are published (they don't) and they want to say (they do) that my words don't represent official Microsoft policy (they don't) then that is okay -- because me blogging about my work is not the same as me blogging as a core and central part of my job.
As luck would have it, I love my work.
And I love the part of my job that involves helping people all over the company when they have questions -- note that I generally can't really blog about any of it unless I extract the non-public details of the questions, though I'll make the effort to do so if the question is one that I think might be of general interest.
And I am willing at least to tolerate the part of my job that involves these people who are so non-supportive of the blog that they instructed me to remove the Blog from my business cards since it is a "personal blog". I won't go so far as to claim respect, but tolerance covers how I feel about that kind of thing. :-)
Given the text of this blog, it is in the end in no way ironic that Microsoft has decided to assert its rights as a copyright holder of the text asserting that (in essence) Microsoft has no interest in what is said here. Since inconsistency among people who dictate policy is hardly unheard of in large corporations, and therefore it is in no way unexpected.
And thus it is not ironic.
Anyone who doesn't like this is invited to bite me at their earliest convenience....
Part 2 will be coming some time next week, and will get a bit more technical than this part has been.
Every scalar value in UCS-4 is an equal co-sponsor of this post, and they invite detractors to bite them, as well!
Content of Michael Kaplan's personal blog not approved by Microsoft (see disclaimer)!Regular readers should keep in mind that all I said in The End? still applies; the allusion to the X-Files continues for people who understand such references....
The other day, colleague Santhosh pointed out to some people that "The abbreviated day name for Friday for ml-IN is wrong."
Curious.
I wrote up a little program to take a look:
using System;using System.Globalization;namespace Testing { class Testing { [STAThread] static void Main(string[] args) { CultureInfo ci = new CultureInfo("ml-IN"); DateTimeFormatInfo dtfi = ci.DateTimeFormat; for(int i=0; i < 7; i++) { Console.WriteLine("{0}\t{1}", dtfi.DayNames[i], dtfi.AbbreviatedDayNames[i]); } } }}
A quick chcp 65001 and a clipboard copy/paste and I got the data back:
ഞായറാഴ്ച ഞായറ്.തിങ്കളാഴ്ച തിങ്കള്.ചൊവ്വാഴ്ച ചൊവ്വ.ബുധനാഴ്ച ബുധന്.വ്യാഴാഴ്ച വ്യാഴം.വെള്ളിയാഴ്ച വെളോളി.ശനിയാഴ്ച ശനി.
Indeed. That full name
വെള്ളിയാഴ്ച
looks okay, but that abbreviated name
വെളോളി.
does look a bit off.
Santhosh also suggested that abbreviated name should instead have been
വെള്ളി.
and that does look like a bit better of an abbreviated form, all things considered.
The problem is indeed that what was expected was a nice conjunct with a LETTER LLA/Chandrakkala/LETTER LLA which instead ended up with a VOWEL SIGN OO in between them. Which would indeed be wrong.
I wonder if someone was doing it with Unicode code points -- putting a U+0d4b rather than U+0d4d -- thus perhaps making it a simple typo in data entry?
It is funny -- putting the chandrakkala in there does something minor on the rendering side, basically
ളള
versus
ള്ള
If you look very carefully (and your OS supports it) you'll see it is a bit more connected. :-)
Though this is one of those weird cases one might hesitate to call it a conjunct in the conventional sense (since the former isn't really anything so if not for the "Virama" model one would wonder whether one could just shape it without the extra invisible character....
This blog brought to you by ോ (U+0d4b, aka MALAYALAM VOWEL SIGN OO)
Via the Contact link, Stapp asks:
Hello there,I read your thread herehttp://blogs.msdn.com/michkap/archive/2007/06/14/3288145.aspxI have the East Asian pack installed by default but never wanted it, and now I have installed SP3.Do you know if SP3 allows the removal of that language pack by just unticking?It would be better if someone more competent than me could test this!Thanks for readingStapp
The two relevant posts here are The one-way trip of installing supplemental language support (the one Stapp pointed to) but also the more importantly relevant Unchecking the checkbox does not necessarily mean 'uninstall'.
It is that latter post that explains that you can uncheck the checkbox to disable the East Asian support by removing all of the relevant registry keys pointing to files and such.
It won't remove the hundreds of megabytes of files, but it will remove the functionality itself and leave the files there, unused.
SP3 neither improves this situation nor makes it any worse -- same results after it is installed.
And then in Vista and Server 2008, neither install nor uninstall is available -- the files are always present....
Now given the text that appears when you do that uninstall:
I agree this is a bug - the clear implication of the text is that the files are being removed. But this is a bug that I doubt is ever going to be fixed in any service pack of QFE/hot fix.....
This post brought to you by 譃 (U+8b43, a Unified CJK ideograph)
Completely personal historical "life of Michael" stuff that can probably be ignored by people who aren't interested in that sort of thing!
I found myself on the phone with Andrea again the other day, at an earlier time thankfully enough. :-)
Although stunning and witty (as those things go), she usually does not take criticism as well as she claims to, which caused me to take the phone call with same delight with which one welcomes impacted wisdom tooth removal, after I blogged On the one who was Built on the Tale O' the Twister This Way.
But she accepted it gracefully and then turned the issue around, asking me (if it had to be more about me) what I wanted to talk about.
Ugh, I hate it when people use my words against me....
So we found ourselves talking about my move to Hartford, that was almost a couple of decades ago -- from Philadelphia to Hartford. By the time I was done, she suggested that I should write about it.
You are now reading it. :-)
I moved because of a girl.
Well, not exactly.
I moved because I had broken up with a girl and suddenly the plans I had did not make as much sense as they did just before the break-up. If we were going to just end up being just a summer thing (she was in fact the one who unknowingly inspired me to suggest to Kathleen Edwards to keep Summerlong in her setlist back in 2005 as I discussed previously), then I was going to have to take stock and decide what to do with the rest of my life.
I was probably a bit too young to be trying to think about the rest of my life, an error in judgment that caused more challenges down the road. But let's go back to that time and not look ahead for a moment....
The original plans (moving to Providence, going to Brown) were out -- Providence is way too small of a town. Too easy to run into the wrong person. It has happened to me in New York City; Providence would never allow me to avoid it.
I had spent a ton of money on college applications and although most were done to see if I could get in (my expenses were low so the big budget on applications for entertainment value seemed worthwhile at the time), I had lots of choices if I wanted to go somewhere else. I thought about it, very carefully.
Hartford was not one of those choices, I had not applied to any schools there. I was taking time off and I threw a dart at a map of the US in a bar that I was not supposed to be at (being only almost 18 at the time). It landed in Enfield, CT -- so I flipped a coin to decide whether to make it Springfield or Hartford. And tails won.
Now the dart and the map were just so I could say one day that's what I did. And I did live in/around the city for like half a decade (Hartford to Vernon to Manchester) and while working through one potential career that aspired to another (discussed previously) I managed to find the job that by the next half decade became my actual career, something I had kind of been doing all along anyway from 7th grade on.
But anyway, back to Hartford.
I was kind of broke.
And when I say broke, I mean that I had enough money to buy a few packs of smokes or some cat food (I went with the cat food, she needed her Friskies more than I needed my Lucky Strikes). All of the money I had went into the 3x the rent (first month + last month + security -- needed for move-in) and although I was working on three different jobs, none of them were going to pay me for 1-3 weeks. Toward Thursday night, feeling like I was going to collapse from hunger, I actually ate some of the cat food, which was incredibly bland -- cats eat boring every day and like it, and then by the next day I had a paycheck and I haven't been quite that broke again since.
And I was a little bit depressed, what with the whole thing that seemed like a breakup that not too long after turned out to definitely be a breakup. Food didn't help, even when it was less bland.
My apartment was on the roof of a building on Allen Place (it was a studio that violated fire codes since it had only one exit, and it was easy to break into as the only possession I had of value -- my lost boom box -- would readily attest to were it not stolen the second night after I moved in). So I listened to my depressing mix tape with songs like
That tape was made for wallowing.
The loss of the boom box made the tape less useful, though I still had the car cassette player when heading to and from work, and I knew all the songs so I just ran them through my head, and I guess played some on the mouth harp (they did not steal the harmonicas, I guess they did not find them when the took the radio. Or maybe they realized they could not get much for them).
So anyway, it was briefly a huge wallow-fest. You probably would have been quite bored if you knew me (and I shunned the friends I had since I did not want to subject them to this).
During the day I was at a day care center in the morning and an elementary/middle/high school in their after-school program in the afternoon, and I had to be cheerful at both of those jobs. I'm no actor but I think I did well enough for the kids, at least.
And soon after that I started meeting people in Hartford and West Hartford and taking college classes and I felt kind of back on track. The "break" was over.
But it is funny, none of the songs from that old tape really remind me of that time on the roof of the building on Allen Place.
The song that reminds me of that time is Youth Group's Daisychains, a song not released until many years later:
Listen now my sweet Anne, I never meant to cause you pain.We could've spent all summer sitting here making daisychains.I lie awake at night staring at my roof.Now you're gone...For weeks I've had your pretty face hanging in my brain.It's suspended like the reflection in a window pane.You hang just like a ghost over city streets.Now you're gone...How could I begin to finish what I couldn't start?I'm more General Haig than Napoleon Bonaparte.Go now, just leave. No more words please.Now you're goneListen now my sweet Anne, I didn't mean to cause you pain.I could have spent all summer sitting here making daisy chains.I lie awake at night staring at my roof.Now you're gone
(I verified the lyrics on the Youth Group site; like most songs out there, the Internet gets it wrong, mostly!)
The girl wasn't named Anne but it ends up being close enough for it to work out. the song is nolt about being on a roof but starring at it yet that doesn't scare me off either. And although the relationship of the song is not much like the one I was in, for some reason the song just gets me.
The whole situation was as defining for my life as that girl who inspired Michael Penn to write No Myth (ref: this blog post), the only real difference being that Michael Penn is much more talented/creative than I am, because blog posts are just not as catchy. :-)
When I listen to Daisychains, In my mind I think I put General Dean (William Dean) rather than General Haig (Douglas Haig). Since I know much less about Haig and I had spent some time studying the Korean War, the Dean notion just fit better in my mind. Both of them had in common the fact that they were each often asked to take action in situations with which they were not entirely comfortable (being asked to do something that conflicted with their advice), in both cases leading to serious consequences (in the case of Haig causing many casualties among his men, in the case of Dean in his own capture and becoming a POW). Dramatic, that. But at that more simple time the relationship ending felt like it had that kind of effect on me, so at least I am being true to that prior version of me. :-)
I was required to move out of that rooftop apartment due to those fire code regulations after four months, though the landlord kept my rent the same as the studio I moved out of for the two-bedroom I moved into as long as I didn't tell the building inspectors where I used to live. His idea -- I wasn't planning to become a snitch anyway. It was nice to have more space, and fewer break-ins.
Before I moved out of the studio, Christine came up from Philly to visit and we hung out for a weekend or so. She can probably attest to it being a dump, though at least it was clean. She can definitely attest to the fact that I was dumped.
Then I moved out of that building within a year or so of moving in there. It was nice enough, but somewhere between the drug dealers and prostitutes and drug users and Trinity students, I just needed to be somewhere that I could get more sleep and a building that had fewer police raids of the lower floors.
I was just looking at the aerial view of the street in Virtual Earth a few minutes ago, and the street was there, just north of Trinity College. But the building doesn't seem to be there anymore, which seems a little sad. Not that I'd be up on the roof over there or anything (I'd be more likely to go up on the roof of the place on Walnut St. in Philadelphia where I lived before I even moved, and even that is pretty unlikely though that structure still appears to be there at least!).
Since they aspasrently tore down the building then it is even more firmly in the past, somehow. But I wonder why that is if I wasn't going to visit anyway? Andrea says it is how we build roots -- we just assume that the places we leave will still be there after all the people go.
While Andrea and I talked I had Daisychains playing on repeat, and it does remind me of that time on the roof of my apartment on Allen Place, when I put what I thought of at the time as my life back together. By the time I left for Columbus five years later I had found a better reason to move (the previous two were in responses to situations involving girls, so I guess I could claim I was becoming more mature).
Somehow this song has transplanted itself atop a memory that was fully lived out and put into storage before the band had even fully formed, and long before the song existed. I wonder how that happened?
Andrea didn't have answers on that issue, but we talked for a bit about her place in South Philly and it turns out she has memories that are analogous. I guess we all have these kinds of memories and maybe even songs we hear that remind us of them even if the song is new. She thought the unusual part was that I also connected it all with a person who had never been there, but since it is where I got over her, it does not seem all that unusual to me.
Well, except for talking about it this much. :-)
We hung up a bit before midnight, and I started writing.
About a roof (that isn't there anymore) and a girl (who isn't, either), and a song (that wasn't there at the time but seems to represent it in my mind quite well under the circumstances).
This blog brought to you by 宀 (U+2f27, aka KANGXI RADICAL ROOF)
You probably wouldn't ever have guessed, but this blog is going to be about the Hebrew month of Adar (אדר).
Now most years it is a nice tidy little month, but the Hebrew calendar starts jumping too far ahead if left to its own devices, so seven out every nineteen years an extra month is added -- generally this is known as intercalation.
This happened in the very year in which we now are, as fate would have it.
And here is where we run into issues.
You see, this extra אדר (Adar) stuff has been going on for a long time.
And אדר (Adar) has some interesting holidays in it, like תענית אסתר (The Fast Of Esther) on the 13th of Adar, פורים (Purim) on the 14th of Adar, and שושן פורים (Shushan Purim) on the 15th of Adar.
This leads to an interesting question when there are two of those אדר (Adar) months popping up -- which אדר (Adar) do we use to celebrate?
Now קראים (Karaite Jews), or perhaps we could call them (for lack of a better term) Biblical Jews, keep themselves in the world of the תנ״ך (The Tanakh, the Jewish Bible). This is as opposed to the (for lack of a better term) Rabbinical Jews, who have the משנה (Mishnah) and גמרא (Gemara) as a huge amount of additional commentary and law and discussion and argument.
So why is this interesting?
Well, those קראים (Karaite Jews) celebrate the holidays in the first אדר (Adar), and the rest celebrate them in the second אדר (Adar) - based on text in the משנה (Mishnah) that instructs as much. Which kind of explains why the קראים (Karaite Jews) don't heed those rules, since they don't consider the משנה (Mishnah) to be law, after all.
So most Jews look at the 14th of that first אדר (Adar) as פורים קטן (Purim Katan -- "Little Purim") and the 15th as שושן פורים קטן (Shushan Purim Katan). There aren't any specific rules on things that must be observed or anything, but there is kind of a minor festivary aspect for people who have a bit of a desire to "get their party on" as often as they can. And I have been to a couple of עדלאידע celebrations over the years (עדלאידע is one of those fun words that make for a great party theme -- it means "until you don't know" because you are supposed to keep drinking until you don't know the difference between the good guy and the bad guy of the story of Purim. I am sure you can imagine a drinking game that can come out of this quite easily!).
Okay, so we have פורים קטן and שושן פורים קטן and תענית אסתר and פורים and שושן פורים. Got it?
Now we'll add computers to the mix.
Specifically, we'll add Windows -- which calls these months אדר (Adar) and אדר ב (Adar Bet/Adar 2), which freaks out some people because they would prefer something more like the .NET side of the world has it in the HebrewCalendar class with an אדר א (Adar Alef/Adar 1) and an אדר ב (Adar Bet/Adar 2). And to make matters worse, some Microsoft products reportedly call the month אדר א (Adar Alef) during non-leap years, when technically it should be (if one had to choose between the two), something more like אדר ב (Adar Bet).
And there are also random bugs reported in programs like Outlook (as this site points out in the article Hebrew calendar leap year mistake).
And the story of פורים as told in the מגילת אסתר (Book of Esther) has interesting weirdnesses on its own -- what with Queen Vashti (ושתי) being asked by the king to dance naked for the court, and when she refused, she was killed1 and all of the other interesting pieces, including the bit about how the decree to kill the Jews could not be set aside, but a second decree to allow the Jews to defend themselves was legal and so the battle was not so one-sided as it might have been otherwise. All I know if that if I was king and I was the sort to have people naked dancing for the court, I would be allowed to do whatever the hell I wanted and reverse any decree that seemed like a bad idea, especially if I drank as much as this king reportedly did and the next morning realized that not every drunken decree is necessarily a good idea....
In the end, the report of the difference between Windows and .NET is a perpetual thread -- raised each time someone notices it, possibly with a bug or several bugs put in. But (ignoring the reported bug in Outlook with the recurring year mistake2), there is technically not a bug here, though there is an inconsistency, and the people who take offense at the implied precedence of the first אדר (Adar) being called plain old אדר (Adar) are free to their opinions but maybe they would not feel strongly if there were not reported bugs implying people were misunderstanding the rules.
1 - According to Jewish sources, some Christian sources just have a divorce happening, though given the king -- known to have people executed even for appearing when they are not called -- this seems a bit of of character.2 - which I will conditionally choose to believe knowing how they mess up with Diwali and all. :-)
This blog brought to you by מ (U+05de, aka HEBREW LETTER MEM)
I tend to prefer doing all of my Instant Messaging in Windows Live Messenger rather than Office Communicator.
Nothing personal, it is just more something that fits me (in truth Windows Messenger was an even better fit, but once you install either of these other two you can't ever launch Windows Messenger again, even if you uninstall them -- it is treated like a post 2009 analog TV set in the US!).
Why? Well, it is like a dozen little things like that which just drive me to the other product. I just don't want to know so much about the people who hang up or whatever else it pays attention to. And so on....
Now I still have to have Office Communicator on my machine, since that seems to be the only way I can forward calls from my office phone1, which means I launch it, set it (or unset it) and then exit.
One amusing thing about Communicator is the words it puts into the status column, such as
and then there is my favorite, the one that comes up if a person is online and not occupied in any of these or various other ways:
Available
I find the "Available" thing to be awfully presumptuous -- available for what, exactly?
Especially at Microsoft, and then especially squared with some of the people on my contact list, there is if nothing else a certain emotional unavailability that is inherent to many of the listed. It just seemed very weird (and perhaps a tad amusing!) to see some of them listed as being "Available"....
To be safe I think I will stick to Windows Live Messenger, though. The more neutral Online is really more up my alley for when I happen to be online, without admitting any particular type of availability. :-)
1 - This is really important when I want to see what the voice recognition software on the Microsoft autodialer is misunderstanding as "Michael Kaplan" during a given week. There have been some amusing ones lately. :-)
This blog brought to you by ਯ (U+0a2f, aka GURMUKHI LETTER YA)
You know, in many cases the date that you run into a problem can be rather ddirectly related to the actual problem.
I'm not thinking of what happens when you wear orange on Saint Patrick's day in Fishtown; I was thinking of programming issues. :-)
Frank Hauptlorenz's question to the microsoft.public.dotnet.internationalization newsgroup the other way was a really good example:
SUBJECT: DateTime.Now.toString("yyyyMMdd") depending on CultureInfo?Hi,I have this instruction mentioned at top running on an japanese client.Strangely this renders to "200809" (just year and day).Has anybody an idea?Thank you,Frank
Now everyone can refresh their memory (or fill their cache, whichever!) by reading Long live the Emperor (ignoring the issue therein but paying attention to descriptive information) for some background on the Japanese Wareki calendar before I start blathering anew here....
Okay, we're all on the same page now?
Good.
This is a calendar that does not account for the idea of a reign longer than 100 years.
I mean, seriously -- how many of the 125 listed in Wikipedia's List of Emperors of Japan spanning 660 BC to present reigned for over 100 years?
If you do the math, you see an average reign of a little over 21 years, which is astounding given how young one could be to ascend....
But in any case, Windows follows suit here, and passing YYYY will be ignored because only YY is really going to be paid heed.
But (and this is where the timing comes into play) all of this was harder to spot since we are in the 20th year of the 平成 (Hensei) era which happens to be in the year 2008.
So when one is looking at 200809, one might tend to see 2008/09 rather than 20/08/09.
I guess you could think of this as one of the gotchas of ignoring cultural conventions (like that yyyyMMdd format) while still doing things in the context of a culture. Because culture will bite you in the butt if you aren't paying it its proper respect! :-)
This blog brought to you by 𐅹 (U+10179, aka GREEK YEAR SIGN)
As always, xkcd provides great context....
I suppose there are less ideal (though perhaps also less dangerous) consequences to be had.
Not sure whether I'd have been in too bleeding huge of a hurry to correct this one either, come to think of it. Once the money is spent and all and everyone knows what to do....
Nuff said? :-)
This blog brought to you by ꌞ (U+a31e, aka YI SYLLABLE SUT)
Over in the Suggestion Box, Bruce Rusk asked:
To keep a long story long: I have an application that I need to use--it's a Chinese dictionary that I use daily and would be seriously bummed to live without. It's a badly-designed Foxpro application, targeted to Traditional Chinese Windows (Big-5), and I run it in Windows XP with AppLocale.It's finicky. It doesn't display quite properly, but well enough to be used. The main issue is with input: there are two ways that I've found to input characters to search:(1) via the traditional Chinese IME(2) by pasting ... but only from Notepad. Pasting from any other application (Word, a browser, everything else I've tried) results in question marks in place of the characters. Being able to paste is essential to help look things up from texts.So my question is: will this rickety train continue to plod along after a Vista upgrade? Is there a way to tell beforehand whether Vista's IME will work and Vista Notepad will have the particular breed of whatever it is (braindeadness?) that makes its clipboard text paste properly? Or is there another way to massage the clipboard into the form this app seems to need?Thanks!
The rickety train should keep muddling along, especially with either the use of AppLocale (though be sure to read the blog I wrote entitled The version of App Locale that runs on Vista? so you know how to get AppLocale on Vista!), or by changing the default system locale to a Traditional Chinese locale -- either way, this non-Unicode application will process the text.
And now we get to the problem, which is that the the dictionary application, which does not know to accept Unicode, is asking for CF_TEXT rather than CF_UNICODETEXT. Many more intelligent applications will register multiple clipboard formats as being available and when your application asks for CF_TEXT, Word (which assumes it knows the exact code page of the system and which registers the formats it accept so it can copy later on demand) is able to give that.
But then silly old Notepad just offers up CF_UNICODETEXT (it is actually even simpler than that but this is close enough for now, maybe I'll get into more later) and lets the system take care of the conversion by creating the text synthetically -- doing its own conversion to CF_TEXT. And since your Dictionary application running under AppLocale assumes the CP_ACP (default system code page) is 950, aka Traditional Chinese. The OS does the conversion and everything is done.
Word and IE and others are skunked by their own cleverness; in providing "better" functionality and not using the default OS clipboard synthetic behavior, these applications do worse!
There is actually no documented way to find out (when IsClipboardFormatAvailable(CF_TEXT) returns TRUE) which type of TRUE it means:
Now the reason that #1 and #2 can be different is left as either an exercise for the student or for some future blog for me to write some day (and yes it is on my list too, with lots of the information I learned from the MSLU days, including how to use CF_LOCALE as well!).
Notepad (or rather the underlying control within it) only knows to send CF_UNICODETEXT, which can work anywhere via #1 when it is requested or #2 when one of the other formats is.
But in the end all hope is not lost and you have two easy workarounds that requires no changes to applications and no external code to be written:
The former will simply work everywhere, and the latter will work between your Dictionary application and any application you set up to work with it....
This blog brought to you by អ (U+17a2, aka KHMER LETTER QA)