Subject RE: How do I get Danish collation with UTF8? -SOLVED
Author Jacob Havkrog
Hi - after help from Helen and a bit of work I figured it out:


1) Download new ICU library from www.icu-project.org. I used version 4.4.2. Make sure you get the right kind (win32/win64 etc).

2) Copy the files icu44dt.dll, icu44in.dll and icu44uc.dll to the firebird bin directory

3) Edit the file intl/fbintl.conf: Set icu-versions from "default" to "4.4". 2 places.

4) Restart the firebird server

5) After that, you can declare

create collation UTF8_DANISH for UTF8 from UNICODE 'LOCALE=da_DK';

Which gives correct case-insensitive sorting of ÆØÅ eg.

select * from account order by name collate UTF8_DANISH

on a database with default char set UTF8.

Notes
1: I used ICU version 4.4.2, later versions didn't work for me but that might be fixed in FB 2.5.3 (http://tracker.firebirdsql.org/browse/CORE-3946)

3: The icu-versions is mentioned 2 places. I don't know if it's enough just to change one of them. I didn't add the name of the new collation to this file.

5: Using the syntax

create collation UTF8_DANISH_CI for UTF8 from UNICODE CASE INSENSITIVE 'LOCALE=da_DK';

create collation UTF8_DANISH_CS for UTF8 from UNICODE CASE SENSITIVE 'LOCALE=da_DK';

doesn't give correct ÆØÅ sorting though... Hopefully that's fixed in FB 2.5.3 too.

Cheers
Jacob



Fra: firebird-support@yahoogroups.com [mailto:firebird-support@yahoogroups.com] På vegne af Jacob Havkrog
Sendt: 16. oktober 2013 11:35
Til: firebird-support@yahoogroups.com
Emne: [firebird-support] How do I get Danish collation with UTF8?

 
Hi- 
The collation of special Danish characters ÆØÅ is not correct according to Danish standards when using UTF8. None of the supported collations sort Å after Æ and Ø. 
Sorting is ÅÆØ but should be ÆØÅ with collation "UTF8" or "UCS_BASIC". The other collations are more wrong.
I use FB 2.5.2 on Windows 64.
Jacob