Re: [xslt] Rework locale feature tests



I have tried to update my libxml & libxslt used in my project. One problem I 
see is with sorting and locales. I used to use (a modified version of) 
xsltICUSort.c (in xslt/examples) to do sorting. (I can send you my version, if 
you are interested, but it is a long time since I did the changes and I do not 
remember the details) If I remember right it required to turn the locale 
support off. This is no longer possible.
I think there never was a configure option for locale support. It certainly 
isn't a feature that was removed.
I would have to check for unix, but for windows, there was a support for turning locales off (via 
configure.js). And it was removed in the commit "Rework locale feature tests".

I tried the new implementation of sort, but I get different results in my 
project tests. E.g. sort without lang works in a different way. Sort with lang 
handles upper/lower case sorting in a different way.
Maybe the behavior of the underlying ICU library changed?
No, I am comparing the results of my ICU based compare function to the official locale based sorting.

A custom sort function overrides the internal sort function. It shouldn't 
matter whether libxslt is compiled with locale support or not.
My sorting function (slightly modified version of libxslt/examples/ xsltICUSort.c) internally calls 
xsltComputeSortResult, which uses a locale if set. Maybe my sorting function could deal with it (e.g. it 
could have its own version of xsltComputeSortResult), but the easiest way was to turn locale support off 
completely. I do not need it, since I do the sort myself.

Vojtech


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]