Bug #43207 wrong LC_TIME names for romanian locale
Submitted: 25 Feb 22:15 Modified: 12 Nov 4:30
Reporter: Andrei Boros
Status: Closed
Category:Server: Charsets Severity:S3 (Non-critical)
Version:5.0.51 OS:Any
Assigned to: Alexander Barkov Target Version:5.1+
Tags: Contribution, lc_time lc_time_names locale romanian
Triage: Triaged: D2 (Serious)

[25 Feb 22:15] Andrei Boros
Description:
The weekday names for locale ro_RO are wrong in libmysqld/sql_locale.cc and
sql/sql_locale.cc 

These names are UTF encoded and are not those present in the system (considering linux
locale for example), they are compiled in the server binary. 

Several diacritics for expressing saturday and sunday use the wrong UTF characters. 

How to repeat:
set lc_time_names='ro_RO';
use DATE_FORMAT(xxx,'%W'); 

Day names for saturday and sunday in romanian are wrong. 

The original encodings in MySQL use for example i-circumflex instead of a-circumflex
(which is the correct writing in romanian since the reforms done after dec-1989) in
saturday. 
This problem also exists for the short weekday name. 

Also, the original encodings use A-breve instead of a-breve (notice the case) in both
saturday and sunday. 

See http://en.wikipedia.org/wiki/Latin_Extended-A character table
[25 Feb 22:27] Andrei Boros
UTF8 encoded characters in the file should be in hex:
- 0xC3A2 instead of 0xC3AE 
- 0xC483 instead of 0xC482

See : http://en.wikipedia.org/wiki/Latin_Extended-A
and the individual characters : 
http://en.wikipedia.org/wiki/%C4%82
http://en.wikipedia.org/wiki/%C3%82
http://en.wikipedia.org/wiki/%C3%8E
[25 Feb 22:28] Andrei Boros
Visual representation of ro_RO locale weekday names. Current MySQL names and the correct
romanian spelling and characters

Attachment: ro_locale_names.jpg (image/jpeg, text), 14.32 KiB.

[25 Feb 22:30] Andrei Boros
patch for correct UTF8 encoded romanian characters

Attachment: ro_RO.locale.diff.gz (application/x-gzip, text), 473 bytes.

[25 Feb 23:19] Andrei Boros
patch for correct UTF8 encoded romanian characters [NEW] [corrected+verified]

Attachment: ro_ro.locale.diff.gz (application/x-gzip, text), 468 bytes.

[26 Feb 8:02] Sveta Smirnova
Thank you for the report.

Technically this is duplicate of bug #22644 I'll mark this too and add to bug #22644
additional information about DuminicĂ and patch.
[26 Feb 11:20] Andrei Boros
Note: patch also solves the short weekday name from Sî to the correct form Sâ.
[2 Sep 19:03] Peter Gulutzan
This change is significant and useful. We should give it higher priority
than Bug#22644, which is less detailed and has no immediate solution.
Accordingly, after checking with Sveta Smirnova and Alexander Barkov,
I have changed from "Duplicate" to "Verified".
[2 Sep 19:43] Liz Drachnik
Hello Andrei 

In order for us to continue the process of reviewing your contribution to MySQL - We
need
you to review and sign the Sun|MySQL contributor agreement (the "SCA")

The process is explained here: 
http://forge.mysql.com/wiki/Sun_Contributor_Agreement

Getting a signed/approved SCA on file will help us facilitate your contribution-- this
one, and others in the future.

Thank you !
[3 Sep 19:58] Andrei Boros
I've just sent the SCA as instructed.
[19 Oct 10:22] Alexander Barkov
The patch by Andrei Boros is Ok to push.
[19 Oct 10:24] Alexander Barkov
References:

http://en.wikipedia.org/wiki/Week-day_names
http://www.digitaldialects.com/Romanian/Daysmonths.htm
[19 Oct 10:56] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/87259
[19 Oct 10:57] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/87261
[19 Oct 11:49] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/87277
[19 Oct 11:52] Alexander Barkov
Pushed into:

- mysql-5.1-bugteam (marked as 5.1.41)
- mysql-pe (marked as 6.0.14)
[4 Nov 10:27] Bugs System
Pushed into 5.1.41 (revid:joro@sun.com-20091104092152-qz96bzlf2o1japwc) (version source
revid:kristofer.pettersson@sun.com-20091019090725-uyyt5qo7zdluh31a) (merge vers: 5.1.41)
(pib:13)
[11 Nov 7:55] Bugs System
Pushed into 6.0.14-alpha (revid:alik@sun.com-20091110093407-rw5g8dys2baqkt67) (version
source revid:alik@sun.com-20091109080109-7dxapd5y5pxlu08w) (merge vers: 6.0.14-alpha)
(pib:13)
[11 Nov 8:03] Bugs System
Pushed into 5.5.0-beta (revid:alik@sun.com-20091109115615-nuohp02h8mdrz8m2) (version
source revid:alik@sun.com-20091105090203-cls5j6k3ohu04xpt) (merge vers: 5.5.0-beta)
(pib:13)
[12 Nov 4:30] Paul DuBois
Noted in 5.1.41, 5.5.0, 6.0.14 changelogs.

The weekday names for the Romanian lc_time_names locale 'ro_RO' were
incorrect. Thanks to Andrei Boros for the patch to fix this bug.