Sorting it all Out Michael Kaplan's random stuff of dubious value Be sure to read the disclaimer here first!
In the past 10 days I have had four people ask me the same question. Here is one if the most recent ones:
Hi Michael,One of my friends was asking if there is an ICU for .NET. icu4c-4_0-Win32-msvc8.zip that he got from http://www.icu-project.org/download/4.0.html seems to be the one for Native Win32.Thanks
Hmmm. I can honestly say that I have no idea whatsoever. :-)
But the whole inquiry scores pretty well on my "scale of 1 to interesting" metric so I think I'll talk about it for a minute. Not as an ICU expert (which I am not), but as an eager and interested external observer who is insanely curious about some of the weirdest things....
As far as I know there are only version for C (ICU4C) and for Java (ICU4J).
Now I do know that many features in ICU4J depend on features and functionality in Java itself, which tells me that ICU4J is not a straight port of ICU4C -- it is an extension to Java to provide the full features of ICU (you must have a minimum version of Java to get full ICU support, for example).
This suggests that someone could choose to build an ICU.NET that took all of the built in features from the appropriate namespaces like System.Globalization and System.Text, and then extended them to add in the other features ICU boasts like the UCA, transliteration, and fuller Unicode Character Database support.
Though I can't imagine Microsoft doing such a project, it does sound like parts of it would be pretty exciting. If I were still a consultant and some client with deep pockets wanted such a deliverable I imagine I'd really push to be one of the deliverers of the deliverable.
But back in the real world, I don't have that kind of time. :-)
I don't know of anyone else working on such a thing either. If anyone does and it isn't a secret they could probably chime in and add a comment or two here. I think it does sound like an interesting idea, and technically speaking it would be a fascinating cross-platform extension of ICU itself (not to mention of .NET which does have other platforms of its own from the Mac to mobile devices and so on).
Anyone out there working on ICU.NET?
This blog brought to you by ? (U+003f, aka QUESTION MARK)
ikvm.net, an implementation of Java 1.6 (less AWT) for .NET, is probably Teh Win here. There might possibly be some missing methods in the underlying Java libraries, but if not you should be able to compile ICU4J into a .NET assembly.
I can't imagine people wanting to have two huge runtimes like Java *and* .NET being loaded up by their applications, though. Yuck!
I'm pretty sure IKVM.Net does not load on the Java runtime. Indeed, according to its front page, IKVM is:
* A Java Virtual Machine implemented in .NET
* A .NET implementation of the Java class libraries
* Tools that enable Java and .NET interoperability
So only one runtime plus a set of support libraries (bad, but not *too* bad).
Hmmm... but as a base to another library (ICU)? I wonder what kind of overhead that would add....
Hmmm... Good. It will be really good if somebody brings an ICU Defn for .NET
Michael, what do you think about writing wrapper in .NET for ICU for win32?
I hope, we could use it like native code, or as a COM/ActiveX object. What say?
What do I think about doing the actual work? I can't because of where I work.
But if someone else wants to do such a thing I'd root for them and be supportive and if they had questions I'd try to be helpful and answer them.... :-)
this has actually already been done. Check out:
Gotta compile it yourself, but we use it for a number of our language software projects.