In libc locales data for lv_LV euro

Bug #1264551 reported by Lafriks
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
GLibC
Confirmed
Medium
langpack-locales (Ubuntu)
Fix Released
Medium
Gunnar Hjalmarsson

Bug Description

As of 01.01.2014 official currency in Latvia will be euro so this should be fixed in locales data in lv_LV locale. Rules for formatting currency should be same as in other EU countries where are euro currency.
I have also reported bug report in gnu libc but I think this should be fixed ASAP.
https://sourceware.org/bugzilla/show_bug.cgi?id=16374

Revision history for this message
In , Lafriks (lafriks-gmail) wrote :

As of 01.01.2014 official currency in Latvia will be Euro so this should be changed in LC_MONETARY from LVL/Ls to euro. Order of currency symbol should be the same as for other EU countries where euro currency are used.

Revision history for this message
In , cjl (cjlhomeaddress) wrote :

Is this best handled by the creation of an @euro locale (like some many others) or are we beyond that point in time and should be gin jsut making direct changes to locales?

Revision history for this message
In , Lafriks (lafriks-gmail) wrote :

If you asking me I don't see point in keeping locale with Ls/LVL as as of 01.01.2014 it will be just history :) I would vote for making direct changes to current locale.

Revision history for this message
In , Carlos-0 (carlos-0) wrote :

(In reply to Chris Leonard from comment #1)
> Is this best handled by the creation of an @euro locale (like some many
> others) or are we beyond that point in time and should be gin jsut making
> direct changes to locales?

If the locales character set already has the euro symbol then I see no reason not to directly edit the locale itself. If we need a new character set then that's a different issue and then we should be using @euro to transition from the old character set to the new one. I don't know if the the BALTIC charset in use by lv_LV has a euro symbol. If it doesn't then I recommend we create lv_LV@euro with an alternate charset that supports the euro symbol.

Revision history for this message
In , Carlos-0 (carlos-0) wrote :

(In reply to Carlos O'Donell from comment #3)
> (In reply to Chris Leonard from comment #1)
> > Is this best handled by the creation of an @euro locale (like some many
> > others) or are we beyond that point in time and should be gin jsut making
> > direct changes to locales?
>
> If the locales character set already has the euro symbol then I see no
> reason not to directly edit the locale itself. If we need a new character
> set then that's a different issue and then we should be using @euro to
> transition from the old character set to the new one. I don't know if the
> the BALTIC charset in use by lv_LV has a euro symbol. If it doesn't then I
> recommend we create lv_LV@euro with an alternate charset that supports the
> euro symbol.

Please note that this isn't a make-work project, but rather that there is some software that doesn't yet work with the euro symbol correctly, therefore we provide two locales during a transitional period to allow users to run certain applications using the old locale.

Revision history for this message
In , Lafriks (lafriks-gmail) wrote :

In Baltic charset there is no euro sign and there is no other charset that contains euro sign and characters needed for Latvian language.
Solution would probably be change LVL/Ls to EUR (e.g. EUR 123,56) in lv_LV and to euro sign (e.g. 123,56 €) in lv_LV.UTF-8.

Revision history for this message
In , cjl (cjlhomeaddress) wrote :

This simple patch built fine with make testing.

Does this seem to do the job?

From 54142df97f52c008a6859c4a0ddecc780f4fd86f Mon Sep 17 00:00:00 2001
From: Chris Leonard <email address hidden>
Date: Tue, 31 Dec 2013 14:32:06 -0500
Subject: [PATCH] Change currency symbol in LC_MONETARY in lv_LV

---
 localedata/locales/lv_LV | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/localedata/locales/lv_LV b/localedata/locales/lv_LV
index 5fbfa1b..47695f5 100644
--- a/localedata/locales/lv_LV
+++ b/localedata/locales/lv_LV
@@ -2122,8 +2122,8 @@ translit_end
 END LC_CTYPE

 LC_MONETARY
-int_curr_symbol "<U004C><U0056><U004C><U0020>"
-currency_symbol "<U004C><U0073>"
+int_curr_symbol "<U0045><U0055><U0052><U0020>"
+currency_symbol "<U20AC>"
 mon_decimal_point "<U002C>"
 mon_thousands_sep "<U00A0>"
 mon_grouping 3;3
--
1.7.11.7

Revision history for this message
In , Carlos-0 (carlos-0) wrote :

(In reply to Lafriks from comment #5)
> In Baltic charset there is no euro sign and there is no other charset that
> contains euro sign and characters needed for Latvian language.
> Solution would probably be change LVL/Ls to EUR (e.g. EUR 123,56) in lv_LV
> and to euro sign (e.g. 123,56 €) in lv_LV.UTF-8.

If it is true that there is no character set that contains the euro and the characters needed for the Latvian language then yes I agree that it would be OK to switch to using "EUR" for lv_LV and the euro symbol for lv_LV.UTF-8.

Are you certain that say ISO-8859-15 doesn't have the characters required for Latvian?

Revision history for this message
In , cjl (cjlhomeaddress) wrote :

Here is the relevant section of the locale make

. . .
lt_LT.UTF-8... done
lt_LT.ISO-8859-13... done
lv_LV.UTF-8... done
lv_LV.ISO-8859-13... done
lzh_TW.UTF-8... done
mag_IN.UTF-8... done
. . .

Revision history for this message
In , Carlos-0 (carlos-0) wrote :

(In reply to Chris Leonard from comment #8)
> Here is the relevant section of the locale make
>
>
> . . .
> lt_LT.UTF-8... done
> lt_LT.ISO-8859-13... done
> lv_LV.UTF-8... done
> lv_LV.ISO-8859-13... done
> lzh_TW.UTF-8... done
> mag_IN.UTF-8... done
> . . .

That's right, gconv's internal alias table aliases BALTIC to ISO-8859-13.

The next steps here are:
* Verify that ISO-8859-13 lacks the euro symbol.
  * If it does then consider creating lv_LV@euro using ISO-8859-15, but only if
    that charset has the required Latvian characters.
  * If it has the euro symbol then just switch lv_LV to use the euro symbol
    from the ISO-8859-13 character set. This skips the creation of the alternate
    @euro locale because the character set hasn't changed.
* Post changes.
* Get review and checkin.

Revision history for this message
In , Andreas Jaeger (jaegerandi) wrote :

I think we should go for UTF-8. In general all new locales are UTF-8, thus switching here should be fine.

Revision history for this message
In , Carlos-0 (carlos-0) wrote :

(In reply to Andreas Jaeger from comment #10)
> I think we should go for UTF-8. In general all new locales are UTF-8, thus
> switching here should be fine.

My worry is that there are programs written that support the BALTIC character set but don't run correctly in full UTF-8. Offering the alternative lv_LV@euro (using UTF-8) allows a distribution to default to lv_LV@euro with users using lv_LV to run older programs that don't fully work with UTF-8?

Does that make sense?

Revision history for this message
In , Lafriks (lafriks-gmail) wrote :

Yes, I'm sure ISO-8859-15 does not contain required characters for Latvian language. Required (0xA1+) characters in Latvian language are: Ā, ā, Č, č, Ē, ē, Ģ, ģ, Ī, ī, Ķ, ķ, Ļ, ļ, Ņ, ņ Š, š, Ū, ū, Ž, ž. Only way of changing to euro in ISO-8859-13 is to use EUR.

(In reply to Carlos O'Donell from comment #9)
>
> That's right, gconv's internal alias table aliases BALTIC to ISO-8859-13.
>
> The next steps here are:
> * Verify that ISO-8859-13 lacks the euro symbol.
> * If it does then consider creating lv_LV@euro using ISO-8859-15, but only
> if
> that charset has the required Latvian characters.
> * If it has the euro symbol then just switch lv_LV to use the euro symbol
> from the ISO-8859-13 character set. This skips the creation of the
> alternate
> @euro locale because the character set hasn't changed.
> * Post changes.
> * Get review and checkin.

Revision history for this message
In , Lafriks (lafriks-gmail) wrote :

But how would lv_LV@euro differ from already wildly used lv_LV.UTF-8? If it is just an alias to lv_LV.UTF-8 than ok but otherwise I don't see point in creating lv_LV@euro as it should be equal to lv_LV.UTF-8.

(In reply to Carlos O'Donell from comment #11)
> My worry is that there are programs written that support the BALTIC
> character set but don't run correctly in full UTF-8. Offering the
> alternative lv_LV@euro (using UTF-8) allows a distribution to default to
> lv_LV@euro with users using lv_LV to run older programs that don't fully
> work with UTF-8?
>
> Does that make sense?

Revision history for this message
In , Carlos-0 (carlos-0) wrote :

(In reply to Lafriks from comment #13)
> But how would lv_LV@euro differ from already wildly used lv_LV.UTF-8? If it
> is just an alias to lv_LV.UTF-8 than ok but otherwise I don't see point in
> creating lv_LV@euro as it should be equal to lv_LV.UTF-8.

That's right, sorry I'd forgotten about that, which is why I initially suggested that lv_LV@euro use ISO-8859-15 instead of UTF-8.

I don't have any data to confirm that lv_LV.UTF-8 is in common usage, but I expect it should be. If lv_LV.UTF-8 were already wildly used why do we need to change lv_LV? The distributions should simply default to the .UTF-8 locale?

Either way this is what needs to be done in my opinion:

Guiding Principles:

(a) The existing lv_LV locale should *not* change it's character set in order to be backwards compatible with old programs that may not work correctly with UTF-8.

(b) A new locale should be created with the @euro extension and should use a character set that is as close to the non-euro extension as possible e.g. ISO-8859-15, but still has all of the required characters and the euro symbol. This is for compatibility.

(c) New programs should be written to use and support UTF-8, and the UTF-8 locale should use the euro symbol.

Next steps:

- Verify that ISO-8859-15 contains all of BALTIC and a euro symbol.
- Create the lv_LV@euro locale using ISO-8859-15 and set the monetary value to the euro symbol.

Distributions should default to lv_LV@euro for maximum compatibility with the old BALTIC locale and use of the euro, or lv_LV.UTF-8 for full UTF-8 support. Users should use lv_LV for maximum backwards compatibility with old programs.

Does anyone object to this? Is this too conservative? I'd like to develop some kind of principle here so we can move forward with consensus from our users.

Revision history for this message
In , Carlos-0 (carlos-0) wrote :

(In reply to Carlos O'Donell from comment #14)
> Next steps:
>
> - Verify that ISO-8859-15 contains all of BALTIC and a euro symbol.
> - Create the lv_LV@euro locale using ISO-8859-15 and set the monetary value
> to the euro symbol.

Lafriks, My apologies I see that you did verify that ISO-8859-15 does not contain all of the required Latvian characters. In that case the only solution here would be:

- Add "EUR" as the euro symbol of lv_LV.
- Verify that lv_LV.UTF-8 displays the euro symbol for monetary.

Users use lv_LV.UTF-8 when they want full UTF-8 support and the euro symbol, while lv_LV will just print "EUR", all as you suggested.

I think Chris' patch did all of that so he should post it for review.

Revision history for this message
Martin Pitt (pitti) wrote :

Thanks. There's quite some discussion going on in the upstream bug; we can pull in the official patch once it has been agreed upon upstream.

Changed in langpack-locales (Ubuntu):
status: New → Triaged
Changed in glibc:
importance: Unknown → Medium
status: Unknown → Confirmed
Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

The patch attached to bug #1101134 fixes this bug too.

Changed in langpack-locales (Ubuntu):
assignee: nobody → Gunnar Hjalmarsson (gunnarhj)
importance: Undecided → Medium
status: Triaged → In Progress
Revision history for this message
Martin Pitt (pitti) wrote :

Thanks Gunnar! Uploaded.

Changed in langpack-locales (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package langpack-locales - 2.13+git20120306-17

---------------
langpack-locales (2.13+git20120306-17) utopic; urgency=low

  * debian/patches/ubuntu-pt_BR-d_fmt.patch:
    Changed d_fmt delimiter from - to / (LP: #1101134).
  * debian/patches/ubuntu-tr_TR-currency_symbol.patch:
    Changed the currency symbol from YTL to TL (LP: #1242416).
  * debian/patches/ubuntu-lv_LV-currency.patch:
    Changed to currency EUR/€ (LP: #1264551).
 -- Gunnar Hjalmarsson <email address hidden> Sun, 28 Sep 2014 23:11:00 +0200

Changed in langpack-locales (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.