GNOME Bugzilla – Bug 480323
Add a build option for libxml2 to use ICU converters
Last modified: 2010-11-04 16:48:05 UTC
Some non-Gnome projects on non-Linux platforms use libxml2, but they also rely on ICU for character encoding conversion in the rest of the project. They end up having two sets of character encoding converters. It'd be nice to make libxml2 use ICU. I have a patch that works well for Windows. I haven't yet figured out how to change configure.in and related files to build it on Linux.
Created attachment 96185 [details] [review] preliminary patch (no configure.in change for linux) As I wrote in the bug report, this one works well on Windows. However, I haven't yet figured out what changes to make to configure.in and related files to compile on Linux (usual Linux desktop certainly does not need this feature, but some small devices - even if they run Linux - may benefit from this).
Could you please use the mailing-list for this kind of request. There is no Windows expertise watching the GNOME bugzilla. In general I'm against having libxml2 depend on ICU because ICU in itself is like 5 times bigger than libxml2. A patch allowing it to be used at user option might go in, but I will not make it a default. Still it's an interesting suggestion, but please get this on the mailing-list, see: http://xmlsoft.org/bugs.html Daniel
I was about to write to the list and I'll do that right away. In the meantime, I'd like to clarify my intent a bit. I would NEVER suggest ICU be the default option. This bug is about adding a build-time (configuration) *option* so that those whose project relies on ICU (for I18N support other than the conversion) do not have to rely on iconv as well.
Created attachment 165459 [details] [review] use ICU converters Chromium/Chrome guys used this patch from a while, it would be great if you can incorporate it upstream.
Okay I finally took the time to go though this. I had to clean this up quite a bit, add configure.in code, fix places where that would not compile or crash (apparently the Chromium guys never enabled that in a "normal build"). I also had to remove a number of changes completely unrelated, some breaking the API/ABI (the namespace parent stuff), but I think it's now okay to push. The regression tests fail on the EBCDIC tests for me, if I compile icu in and iconv off, but at least it doesn't crash, and everything else seems to pass. Daniel