Bug #43207 wrong LC_TIME names for romanian locale
Submitted: 25 Feb 2009 21:15 Modified: 18 Dec 2009 20:43
Reporter: Andrei Boros (OCA) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Charsets Severity:S3 (Non-critical)
Version:5.0.51 OS:Any
Assigned to: Alexander Barkov CPU Architecture:Any
Tags: Contribution, lc_time lc_time_names locale romanian

[25 Feb 2009 21: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 2009 21: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 2009 21: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 2009 21:30] Andrei Boros
patch for correct UTF8 encoded romanian characters

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

[25 Feb 2009 22: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 2009 7: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 2009 10:20] Andrei Boros
Note: patch also solves the short weekday name from Sî to the correct form Sâ.
[2 Sep 2009 17: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 2009 17: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 2009 17:58] Andrei Boros
I've just sent the SCA as instructed.
[19 Oct 2009 8:22] Alexander Barkov
The patch by Andrei Boros is Ok to push.
[19 Oct 2009 8:24] Alexander Barkov
References:

http://en.wikipedia.org/wiki/Week-day_names
http://www.digitaldialects.com/Romanian/Daysmonths.htm
[19 Oct 2009 8: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 2009 8: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 2009 9: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 2009 9:52] Alexander Barkov
Pushed into:

- mysql-5.1-bugteam (marked as 5.1.41)
- mysql-pe (marked as 6.0.14)
[4 Nov 2009 9: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 2009 6: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 2009 7: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 2009 3: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.
[18 Dec 2009 10:33] Bugs System
Pushed into 5.1.41-ndb-7.1.0 (revid:jonas@mysql.com-20091218102229-64tk47xonu3dv6r6) (version source revid:jonas@mysql.com-20091218095730-26gwjidfsdw45dto) (merge vers: 5.1.41-ndb-7.1.0) (pib:15)
[18 Dec 2009 10:49] Bugs System
Pushed into 5.1.41-ndb-6.2.19 (revid:jonas@mysql.com-20091218100224-vtzr0fahhsuhjsmt) (version source revid:jonas@mysql.com-20091217101452-qwzyaig50w74xmye) (merge vers: 5.1.41-ndb-6.2.19) (pib:15)
[18 Dec 2009 11:04] Bugs System
Pushed into 5.1.41-ndb-6.3.31 (revid:jonas@mysql.com-20091218100616-75d9tek96o6ob6k0) (version source revid:jonas@mysql.com-20091217154335-290no45qdins5bwo) (merge vers: 5.1.41-ndb-6.3.31) (pib:15)
[18 Dec 2009 11:18] Bugs System
Pushed into 5.1.41-ndb-7.0.11 (revid:jonas@mysql.com-20091218101303-ga32mrnr15jsa606) (version source revid:jonas@mysql.com-20091218064304-ezreonykd9f4kelk) (merge vers: 5.1.41-ndb-7.0.11) (pib:15)