Bug 16374 - lv_LV: change currency symbol in LC_MONETARY to euro
Summary: lv_LV: change currency symbol in LC_MONETARY to euro
Status: RESOLVED FIXED
Alias: None
Product: glibc
Classification: Unclassified
Component: localedata (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: 2.24
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-27 17:03 UTC by Lafriks
Modified: 2016-04-20 21:17 UTC (History)
6 users (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:
fweimer: security-


Attachments
Ubuntu patch of the lv_LV locale definition file (538 bytes, patch)
2014-09-28 21:36 UTC, Gunnar Hjalmarsson
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Lafriks 2013-12-27 17:03:59 UTC
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.
Comment 1 Chris Leonard 2013-12-29 16:48:07 UTC
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?
Comment 2 Lafriks 2013-12-30 14:41:23 UTC
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.
Comment 3 Carlos O'Donell 2013-12-30 20:51:53 UTC
(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.
Comment 4 Carlos O'Donell 2013-12-30 21:00:14 UTC
(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.
Comment 5 Lafriks 2013-12-31 17:28:18 UTC
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.
Comment 6 Chris Leonard 2013-12-31 19:38:28 UTC
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 <cjlhomeaddress@gmail.com>
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
Comment 7 Carlos O'Donell 2013-12-31 19:41:50 UTC
(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?
Comment 8 Chris Leonard 2013-12-31 19:45:10 UTC
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
. . .
Comment 9 Carlos O'Donell 2013-12-31 20:16:46 UTC
(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.
Comment 10 Andreas Jaeger 2014-01-01 06:06:05 UTC
I think we should go for UTF-8. In general all new locales are UTF-8, thus switching here should be fine.
Comment 11 Carlos O'Donell 2014-01-02 02:06:52 UTC
(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?
Comment 12 Lafriks 2014-01-02 06:09:49 UTC
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.
Comment 13 Lafriks 2014-01-02 06:16:16 UTC
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?
Comment 14 Carlos O'Donell 2014-01-02 14:42:17 UTC
(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.
Comment 15 Carlos O'Donell 2014-01-02 14:45:04 UTC
(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.
Comment 16 Gunnar Hjalmarsson 2014-09-28 21:36:48 UTC
Created attachment 7813 [details]
Ubuntu patch of the lv_LV locale definition file

Attached please find a patch which we are about to apply in Ubuntu.

$ LC_MONETARY=lv_LV.UTF-8 locale currency_symbol
€
$ LC_MONETARY=lv_LV locale currency_symbol
EUR

Seems to do its job.
Comment 17 Mike Frysinger 2016-04-15 17:43:19 UTC
this should be fixed in latest master (and for glibc-2.24) via:
  http://patchwork.sourceware.org/patch/11703/
Comment 18 jsm-csl@polyomino.org.uk 2016-04-20 20:01:22 UTC
On Fri, 15 Apr 2016, vapier at gentoo dot org wrote:

>              Status|NEW                         |RESOLVED
>          Resolution|---                         |FIXED
> 
> --- Comment #17 from Mike Frysinger <vapier at gentoo dot org> ---
> this should be fixed in latest master (and for glibc-2.24) via:

Please set the milestone if marking a bug fixed.