Could anyone look at this?

Mark

On 27-2-2016 14:00, Mark Rotteveel wrote:
> In an attempt to find an answer to a stackoverflow question
> (http://stackoverflow.com/questions/35581763/firebird-utf-8-german-phonebook-sorting),
> I installed an extra ICU library (ICU 5.6) in my Firebird 2.5.5 install.
>
> And I ran into a variety of problems.
>
> I added to /bin
>
> * icudt56.dll
> * icuin56.dll
> * icuuc56.dll
>
> And modified fbintl.conf to
>
> <intl_module builtin>
>       icu_versions    default 5.6
> </intl_module>
>
> With this the statement:
>
> create collation unicode_de1 for utf8 from unicode
>      case insensitive 'LOCALE=de_DE';
>
> fails with
> SQL Message : -607
> This operation is not defined for system tables.
>
> Engine Code    : 335544351
> Engine Message :
> unsuccessful metadata update
> Invalid collation attributes
>
> And adding the ICU version makes it work.
>
> create collation unicode_de1 for utf8 from unicode
>      case insensitive 'ICU-VERSION=5.6;LOCALE=de_DE';
>
> However using this collation does not work. For example:
>
> SELECT r.FIRSTNAME, r.LASTNAME
> FROM TABLE_NAME r order by r.LASTNAME collate unicode_de1, r.FIRSTNAME
>
> Results in error:
> SQL Message : -204
> Undefined name
>
> Engine Code    : 335544855
> Engine Message :
> COLLATION UNICODE_DE1 for CHARACTER SET UTF8 is not installed
>
> Looking at RDB$COLLATIONS, the column RDB$SPECIFIC_ATTRIBUTES does not
> include the `ICU-VERSION=5.6` attribute. I can make it work by either
> changing fbintl.conf to
>
> <intl_module builtin>
> icu_versions 5.6
> </intl_module>
>
> or by adding the version attribute to the collation by executing
>
> UPDATE RDB$COLLATIONS
>     SET RDB$SPECIFIC_ATTRIBUTES='ICU-VERSION=5.6;LOCALE=de_DE'
> WHERE RDB$COLLATION_NAME = 'UNICODE_DE1'
>
> Is this a bug, or did I do something wrong?
>
> Now the second part of the problem: the stackoverflow question wants to
> define the German phonebook sort order. Looking at the CLDR data and the
> ICU documentation, this would mean that the locale is
> de@collation=phonebook or de__PHONEBOOK:
>
> create collation unicode_de1 for utf8 from unicode
> case insensitive 'ICU-VERSION=5.6;LOCALE=de@collation=phonebook';
>
> However this doesn't work nor with de__PHONEBOOK: I get a "Invalid
> collation attributes" error.
>
> Is this the wrong way to create this collation, or is Firebird parsing
> the attributes incorrectly?
>
> Mark
>


-- 
Mark Rotteveel

------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to