Bug #1793 Ukrainian letters are not supported in cp1251.conf
Submitted: 10 Nov 2003 6:41 Modified: 15 Nov 2003 5:51
Reporter: Walery Studennikov Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:4.0.16 OS:Linux (Linux)
Assigned to: CPU Architecture:Any

[10 Nov 2003 6:41] Walery Studennikov
Description:
Ukrainian letters are not supported in cp1251.conf.
The letter codes in CP1251 encoding are:
0xA1, 0xA2, 0xAA, OxAF, 0xB2, OxB3, 0xBA, 0xBF
This means that indexes for those letters are build wrong (wrong sorting order, wrong upcase/lowcase concersions).

How to repeat:
There are many problems using ukrainian letters in cp1251 encoding.
For example:

Create text with ukrainian letters in cp1251 encoding.
For example "<0xB3><0xBF>" (0xXX means codes of letters)
Try to find "<0xBF><0xB3>" string (with swapped characters).
It will found record "<0xB3><0xBF>".

Suggested fix:
Patch for cp1251.conf is located here:
http://despair.pp.ru/cp1251.conf.diff
[10 Nov 2003 6:42] Walery Studennikov
Patch for cp1251.conf

Attachment: cp1251.conf.diff (application/octet-stream, text), 4.17 KiB.

[15 Nov 2003 2:13] Alexander Keremidarski
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.mysql.com/documentation/ and the instructions on
how to report a bug at http://bugs.mysql.com/how-to-report.php

This is because before 4.1 Character sets are somewhat "General" trying to adopt all languages using them. Thus cp1251 is what we call Accent Insensitive.

When using cp1251:
SELECT CAST(0xB3 AS CHAR) = CAST(0xBF AS CHAR); -> 1

In 4.1 you can use different collations with cp1251 to control case and accent sensitivity according to various languages rules.
[15 Nov 2003 5:51] Sergei Golubchik
Actually, there is win1251ukr character set in 4.0

if you'll find that it is not correct either - please reopen this bugreport.