by Michael S. Kaplan, published on 2011/06/17 07:01 -04:00, original URI: http://blogs.msdn.com/b/michkap/archive/2011/06/17/10173790.aspx
Prior blogs in this series:
As you work though the IDN story in your own company, you will likely find an interesting mix in the support story, just as I have.
Perhaps one of those most interesting areas has been in the tiny (one might say "puny" to invoke a groaner of a pun!) detail work.
Like path detection.
There are algorithms in RichEdit that colleague Murray Sargent tells me are quite sophisticated. You get to it in theRichEdit with things like EM_GETAUTOURLDETECT and EM_AUTOURLDETECT and such. He has even mentiomed the AutoURL stuff in his blog before (like here).
Or in places like WordPad you just type a URL or a path, or load a file with one, and you can see the effect of turning the behavior on via these programmatic means -- it wil detect the path and mark it as if it was a clickable URL/path in a browser.
If you move over to Word it's even more sophisticated, with a config option in the UI:
The good old "Replace Internet and network path with hyperlinks" feature!
Until you include IDN in the mix, at least.
Let's take four URLs that could easily be created if you have set up a machine to test out IDN (server names/namespaces changed to protect something or other), and try to put them in Word 2010:
which was unable to properly detect one of the URLs out of the four.
Can you guess why it failed?
Or you could try it the same four URLs in WordPad on Windows 7:
Wow, 0/4. Not too sophieticated!
I'll point Murray to this post, and within a few hours he'll tell me that the latest version of RichEdit (essentially the one on his machine) supports all four URLs.
Of course not everything on Murray's machine gets checked in without a bug report so I'll work on that too. :-)
Let's try pasting those same four URLs here to see what this Blog Editor does wih them:
Wow, that's disappointing.
It looks like there are a bunch of URL detection functions that don't do so well with IDN.
I wonder if UNC paths fare any better?
I'm just kidding, I don't wonder. because I tried it.
The other two (WordPad and word 2010) behaved about like the third URL did, for reasons that might be obvious if you think about how tha Autodetect code works (or doesn't, in this case).
Now this kind of stuff is obviously not core feature work, it's a nice little "extra", but really it isn't so nice when it screws up.
As it does with IDn on the absolue latest version of evedry product/app/control I had immediate access to.
Sounds like there are some bugs for people to look at, huh? :-)
In the end, the roadpath to Hell is paved with IDN bugs!
Yuri Khan on 17 Jun 2011 10:33 AM:
IDN already *is* one of those good intentions paving the road to hell.
Quppa on 17 Jun 2011 7:00 PM:
I'm pleased to report that Windows Live Messenger 2011 (v15) picks up those 4 URLs correctly :)
It's one of the first things I noticed when upgrading from version 14 (aside: was there ever an explanation for the jump in version numbers for Wave 3 onwards?). It does have some unpleasant side effects, however: if I write '（テスト：http://www.quppa.net/keiki）', it will pick up the final closing bracket (U+FF09, I think) as being part of the URL.
Quppa on 17 Jun 2011 7:09 PM:
And relatedly, validating IRIs with regular expressions is not trivial: stackoverflow.com/.../190405
Ian Macfarlane on 20 Jun 2011 2:30 AM:
Even search engines are struggling with IDNs - I did a bit of research a while back which showed issues with Google, Bing and Yahoo! see http://goo.gl/cgOLM (first article) and http://goo.gl/pr66K (follow-up piece half a year later which showed that there were still serious IDN-handling bugs).
go to newer or older post, or back to index or month or day