Bush might've still hid the facts, but he can't hide them from Vista SP1/Server 2008 Notepad!

by Michael S. Kaplan, published on 2008/03/25 03:01 -04:00, original URI: http://blogs.msdn.com/b/michkap/archive/2008/03/25/8334796.aspx

Content of Michael Kaplan's personal blog not approved by Microsoft (see disclaimer)! 

My blog Behind 'How to break Windows Notepad' was a pretty popular one, as were its follow-up posts -- More on that which breaks Windows Notepad and The Notepad encoding detection issues keep coming up.

Someone suggested to me that it was because they spent more time explaining why it was happening then composing fun sentences like Bush hid the facts and such. a popular pastime, to be sure, but not one that gets very far after that unless you know Chinese and manage to construct a string that is funny in both languages.

As a by the way, that would impress me very much if someone was able to come up with it! It is like Numerology on steroids to take the ASCII values for English letters and map them in one's ,ind to the Unicode code point values for Chinese in a way that you come up with such a word!

But that is not the subject of today's blog post. I just can't help saying that I am practically willing to fly to the person who comes up with this and buy them a glass full of whatever they are drinking! :-)

Today is about Erzengel's comment to the original post yesterday, here:

I can't repro in Vista. Fixed?

Well, that simply indicates that Erzengel has SP1 installed on his Vista machine. Because in Vista SP1 and Server 2008 have indeed taken steps to mitigate this issue (in other words, fix this bug!).

Now for the record this was not a change in the IsTextUnicode function, it was a change to Notepad, which now uses a slightly modified version of the algorithm I mentioned in The Notepad encoding detection issues keep coming up, one that is a bit more skeptical of the results of IsTextUnicode when its only basis for returning TRUE is IS_TEXT_UNICODE_STATISTICS and it has one of these kinds of strings

I might have argued that it should have been fixed in the function, but for most uses I think the IsTextUnicode results are no worse than problems behind the reasons that I don't like IsTextUnicode anyway. So in the end this probably okay to take the public concerns out of the problem.

And it is cheaper than fixing the freaking function I don't like, which no one felt like jumping up to do. I get tempted to do it myself, though to be honest I am most tempted to just try to get a development intern who would be given this job -- rehabilitating IsTextUnicode's functionality to make it a worthwhile function I'd be proud to not make fun of one day. Though maybe the PTB wouldn't want to assign resources that way, I think it would be a fun project if I were an intern. :-)

Anyway, the summary -- starting in Vista SP1/Server 2008, only IsTextUnicode thinks that Bush hid the facts. :-)


This post brought to you by (U+fffd, a.k.a. REPLACEMENT CHARACTER)

Mihai on 26 Mar 2008 12:55 PM:

"Because in Vista SP1 and Server 2008 have indeed taken steps to mitigate this issue (in other words, fix this bug!)."


Vista SP1 is taking away all the fun!


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

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