Issue Details (XML | Word | Printable)

Key: CORE-3131
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Dmitry Yemanov
Reporter: Aleksey Timohin
Votes: 0
Watchers: 1

If you were logged in you would be able to see more operations.
Firebird Core

WIN1257_LV (Latvian) collation is wrong for 4 letters: A E I U.

Created: 09/Sep/10 03:32 PM   Updated: 27/May/15 04:50 PM
Component/s: Charsets/Collation
Affects Version/s: 2.5 RC3
Fix Version/s: 2.1.4, 2.5.1, 3.0 Alpha 1

File Attachments: 1. File test_lv2.gbk (5 kB)
2. File test_lv_script_utf8.sql (3 kB)

Environment: any

QA Status: Done successfully
Test Details: Test data were taken from the script provided in this ticket.

 Description  « Hide
In latvian alphabet there can be accented letters A E I U (and others). Accented letters should follow after simple letters according the rules of alphabet, but they don't. For now, Firebird does not sort them, and our clients are unhappy with that.

For now it works that way:
A and Ā, a and ā - no difference in sorting
E and Ē, e and ē - no difference in sorting
I and Ī, i and ī - no difference in sorting
U and Ū, u and ū - no difference in sorting

Currently it works as described here:

Should be:
AĀ, aā
EĒ, eē
IĪ, iī
UŪ, uū

Link to latvian alphabet in Wikipedia:

I can provide you additional information and/or test DB and if you need.

Can this be fixed in Firebird 2.5 Final? Or maybe there is way to fix it also for older FB versions?

p.s. I tried to create custom collation with ACCENT, but it doesn't work as expected.

Thank you in advance.

Script to reproduce the problem in attachment. Script creates table with 2 fields: "TEXT" - latvian text, "SORTIROVKA" - text field with right indexes. Script is saved in UTF-8 encoding.

To reproduce problem, use query:
select *
from TEST_LV_SORT tls
order by tls.text COLLATE WIN1257;


select *
from TEST_LV_SORT tls
order by tls.text COLLATE test_lv;

Also I attached backup file for DB with test data (same as in script). Backup image (gbak) for Firebird 2.5.

 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Aleksey Timohin added a comment - 09/Sep/10 03:38 PM

Aleksey Timohin added a comment - 10/Sep/10 06:06 PM
added script and DB backup

Dmitry Yemanov added a comment - 13/Sep/10 03:03 PM - edited
Please test the next (tomorrow's) snapshot build. Note that you'll have to recreate all indices existing for WIN1257_LV columns, or backup/restore the database.

Aleksey Timohin added a comment - 22/Sep/10 03:02 PM
Tested (on 2.5.1). Work as described. Thank you.

But there is another issue:
Custom created collation with ACCENT INSENSITIVE still work in the same way as ACCENT SENSITIVE collation.

   FOR WIN1257
from win1257_lv
no pad

select *
from TEST_LV_SORT tls
order by tls.text COLLATE my_lv2;

Query result records will be ordered using accented characters rules.

This bug is not actual and not vital for us, but it exist.