This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] localedata: Reorganize Unicode LC_CTYPE inclusion.


27.10.2017 18:02 Carlos O'Donell <carlos@redhat.com> wrote:
> [...]
> As subsystem maintainer for localedata you do not need review. You can assume
> consensus and fix the file directly.
>
> You are correct that the category lines are in error, they should be removed,
> I didn't notice them in my final regeneration.
>
> However! The category line generated by
> localedata/unicode-gen/gen_unicode_ctype.py
> is also wrong.

So this time it was worth to wait for your review.

> It is a static 'unicode:2014', and this is invalid.
>
> ISO 30112 standard defines the valid values for the category.
>
> There are only 4 valid values:
> "i18n:2012"
> "i18n:2004"
> "posix:1993"
> and they state the conformance of the category itself.
>
> Next step:
>
> * Remove the category entries in i18n_ctype except for LC_CTYPE.
> * Adjust the category entry for LC_CTYPE to use "i18n:2012"
> * Adjust gen_unicode_ctype.py to output "i18n:2012" instead of the invalid
> "unicode:2014"

Done.

> We should make localedef validate the conformance of this value, but that's
> another patch.

OK, indeed it's another patch so I did not implement this.

> I will assume you will make the changes unless you hand them off to me.

Please see the attachment.

Regards,

Rafal
From cf2866a2121e3f304d515dcf880ce66390d56101 Mon Sep 17 00:00:00 2001
From: Rafal Luzynski <digitalfreak@lingonborough.com>
Date: Thu, 26 Oct 2017 22:12:23 +0200
Subject: [PATCH] localedata: Once again correct and regenerate i18n_ctype.

Following the previous work by Carlos O'Donell the category of LC_CTYPE
is correctly set to "i18n:2012" rather than "unicode:2014" and the
i18n_ctype file is once again regenerated from scratch to make sure it
does not contain any manual additions except the copyright message.

	* localedata/unicode-gen/gen_unicode_ctype.py (output_head):
	  category of LC_CTYPE set to "i18n:2012".
	* localedata/locales/i18n_ctype: Regenerated from scratch
	  reflecting the change above.
---
 localedata/locales/i18n_ctype               | 16 ++--------------
 localedata/unicode-gen/gen_unicode_ctype.py |  2 +-
 2 files changed, 3 insertions(+), 15 deletions(-)

diff --git a/localedata/locales/i18n_ctype b/localedata/locales/i18n_ctype
index b965563..f1bf72e 100644
--- a/localedata/locales/i18n_ctype
+++ b/localedata/locales/i18n_ctype
@@ -26,20 +26,8 @@ fax       ""
 language  ""
 territory "Earth"
 revision  "10.0.0"
-date      "2017-10-23"
-category  "unicode:2014";LC_CTYPE
-
-category "i18n:2012";LC_IDENTIFICATION
-category "i18n:2012";LC_CTYPE
-category "i18n:2012";LC_COLLATE
-category "i18n:2012";LC_TIME
-category "i18n:2012";LC_NUMERIC
-category "i18n:2012";LC_MONETARY
-category "i18n:2012";LC_MESSAGES
-category "i18n:2012";LC_PAPER
-category "i18n:2012";LC_NAME
-category "i18n:2012";LC_ADDRESS
-category "i18n:2012";LC_TELEPHONE
+date      "2017-10-30"
+category  "i18n:2012";LC_CTYPE
 END LC_IDENTIFICATION
 
 LC_CTYPE
diff --git a/localedata/unicode-gen/gen_unicode_ctype.py b/localedata/unicode-gen/gen_unicode_ctype.py
index 38b4aab..a2d1684 100755
--- a/localedata/unicode-gen/gen_unicode_ctype.py
+++ b/localedata/unicode-gen/gen_unicode_ctype.py
@@ -182,7 +182,7 @@ def output_head(i18n_file, unicode_version, head=''):
         i18n_file.write('revision  "{:s}"\n'.format(unicode_version))
         i18n_file.write('date      "{:s}"\n'.format(
             time.strftime('%Y-%m-%d')))
-        i18n_file.write('category  "unicode:2014";LC_CTYPE\n')
+        i18n_file.write('category  "i18n:2012";LC_CTYPE\n')
         i18n_file.write('END LC_IDENTIFICATION\n')
         i18n_file.write('\n')
         i18n_file.write('LC_CTYPE\n')
-- 
2.7.5


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]