Re: [OE-core] [PATCH 2/2] glibc: Add a C.UTF-8 locale

2019-04-17 Thread Changqing Li


On 4/16/19 9:18 PM, Adrian Bunk wrote:

On Tue, Apr 16, 2019 at 05:49:44PM +0800, changqing...@windriver.com wrote:

From: Changqing Li 

* This patch is get from fedora project, link:
https://src.fedoraproject.org/rpms/glibc/blob/0457f649e3fe6299efe384da13dfc923bbe65707/f/glibc-c-utf8-locale.patch

* At this point, most major distro have support this locale
...

Is there now agreement on the exact semantics of this locale?
I remember this was a problem when it was suggested for upstream
inclusion ~ 5 years ago

E.g. the Debian definition of C.UTF-8 is very different to and
more than 10 times to size of the Fedora definition of C.UTF-8.


I think no,  glibc bug still in New status.



cu
Adrian


--
BRs

Sandy(Li Changqing)

--
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH 2/2] glibc: Add a C.UTF-8 locale

2019-04-16 Thread Adrian Bunk
On Tue, Apr 16, 2019 at 05:49:44PM +0800, changqing...@windriver.com wrote:
> From: Changqing Li 
> 
> * This patch is get from fedora project, link:
> https://src.fedoraproject.org/rpms/glibc/blob/0457f649e3fe6299efe384da13dfc923bbe65707/f/glibc-c-utf8-locale.patch
> 
> * At this point, most major distro have support this locale
>...

Is there now agreement on the exact semantics of this locale?
I remember this was a problem when it was suggested for upstream
inclusion ~ 5 years ago.

E.g. the Debian definition of C.UTF-8 is very different to and
more than 10 times to size of the Fedora definition of C.UTF-8.

cu
Adrian

-- 

   "Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
   "Only a promise," Lao Er said.
   Pearl S. Buck - Dragon Seed

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 2/2] glibc: Add a C.UTF-8 locale

2019-04-16 Thread changqing.li
From: Changqing Li 

* This patch is get from fedora project, link:
https://src.fedoraproject.org/rpms/glibc/blob/0457f649e3fe6299efe384da13dfc923bbe65707/f/glibc-c-utf8-locale.patch

* At this point, most major distro have support this locale

* refer:
https://sourceware.org/bugzilla/show_bug.cgi?id=17318
https://sourceware.org/glibc/wiki/Proposals/C.UTF-8
https://bugs.python.org/issue19846
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=636086

Signed-off-by: Changqing Li 
---
 .../glibc/glibc/Add-a-C.UTF-8-locale.patch | 270 +
 meta/recipes-core/glibc/glibc_2.29.bb  |   1 +
 2 files changed, 271 insertions(+)
 create mode 100644 meta/recipes-core/glibc/glibc/Add-a-C.UTF-8-locale.patch

diff --git a/meta/recipes-core/glibc/glibc/Add-a-C.UTF-8-locale.patch 
b/meta/recipes-core/glibc/glibc/Add-a-C.UTF-8-locale.patch
new file mode 100644
index 000..77b3ebd
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc/Add-a-C.UTF-8-locale.patch
@@ -0,0 +1,270 @@
+>From 2eda7b462b415105f5a05c1323372d4e39d46439 Mon Sep 17 00:00:00 2001
+From: Mike FABIAN 
+Date: Mon, 10 Aug 2015 15:58:12 +0200
+Subject: [PATCH] Add a C.UTF-8 locale
+
+---
+ localedata/SUPPORTED |   1 +
+ localedata/locales/C | 238 +++
+ 2 files changed, 239 insertions(+)
+ create mode 100644 localedata/locales/C
+
+diff --git a/localedata/SUPPORTED b/localedata/SUPPORTED
+index 8ca023e..2a78391 100644
+--- a/localedata/SUPPORTED
 b/localedata/SUPPORTED
+@@ -1,6 +1,7 @@
+ # This file names the currently supported and somewhat tested locales.
+ # If you have any additions please file a glibc bug report.
+ SUPPORTED-LOCALES=\
++C.UTF-8/UTF-8 \
+ aa_DJ.UTF-8/UTF-8 \
+ aa_DJ/ISO-8859-1 \
+ aa_ER/UTF-8 \
+diff --git a/localedata/locales/C b/localedata/locales/C
+new file mode 100644
+index 000..fdf460e
+--- /dev/null
 b/localedata/locales/C
+@@ -0,0 +1,238 @@
++escape_char /
++comment_char %
++% Locale for C locale in UTF-8
++
++LC_IDENTIFICATION
++title  "C locale"
++source ""
++address""
++contact""
++email  "mfab...@redhat.com"
++tel""
++fax""
++language   "C"
++territory  ""
++revision   "1.0"
++date   "2015-08-10"
++%
++category  "C:2015";LC_IDENTIFICATION
++category  "C:2015";LC_CTYPE
++category  "C:2015";LC_COLLATE
++category  "C:2015";LC_TIME
++category  "C:2015";LC_NUMERIC
++category  "C:2015";LC_MONETARY
++category  "C:2015";LC_MESSAGES
++category  "C:2015";LC_PAPER
++category  "C:2015";LC_NAME
++category  "C:2015";LC_ADDRESS
++category  "C:2015";LC_TELEPHONE
++category  "C:2015";LC_MEASUREMENT
++END LC_IDENTIFICATION
++
++LC_CTYPE
++copy "i18n"
++
++translit_start
++include "translit_combining";""
++translit_end
++
++END LC_CTYPE
++
++LC_COLLATE
++order_start forward
++
++..
++
++
++..
++
++
++..
++
++
++..
++
++
++..
++
++
++..
++
++UNDEFINED
++order_end
++END LC_COLLATE
++
++LC_MONETARY
++% This is the 14652 i18n fdcc-set definition for
++% the LC_MONETARY category
++% (except for the int_curr_symbol and currency_symbol, they are empty in
++% the 14652 i18n fdcc-set definition and also empty in
++% glibc/locale/C-monetary.c. But localedef complains in that case).
++%
++% Using "USD" for int_curr_symbol. But maybe "XXX" would be better?
++% XXX is "No currency" (https://en.wikipedia.org/wiki/ISO_4217)
++int_curr_symbol ""
++% Using "$" for currency_symbol. But maybe  would be better?
++% U+00A4 is the "generic currency symbol"
++% (https://en.wikipedia.org/wiki/Currency_sign_%28typography%29)
++currency_symbol ""
++mon_decimal_point   ""
++mon_thousands_sep   ""
++mon_grouping-1
++positive_sign   ""
++negative_sign   ""
++int_frac_digits -1
++frac_digits -1
++p_cs_precedes   -1
++int_p_sep_by_space  -1
++p_sep_by_space  -1
++n_cs_precedes   -1
++int_n_sep_by_space  -1
++n_sep_by_space  -1
++p_sign_posn -1
++n_sign_posn -1
++%
++END LC_MONETARY
++
++LC_NUMERIC
++% This is the POSIX Locale definition for
++% the LC_NUMERIC category.
++%
++decimal_point   ""
++thousands_sep   ""
++grouping-1
++END LC_NUMERIC
++
++LC_TIME
++% This is the POSIX Locale definition for
++% the LC_TIME category.
++%
++% Abbreviated weekday names (%a)
++abday   "";"";/
++"";"";/
++"";"";/
++""
++
++% Full weekday names (%A)
++day "";/
++"";/
++"";/
++
"";/
++"";/
++"";/
++""
++
++% Abbreviated month names (%b)
++abmon   "";"";/
++"";"";/
++"";"";/
++"";"";/
++"";"";/
++"";""
++
++% Full month names (%B)
++mon "";/
++"";/
++"";/
++"";/
++"";/
++"";/
++"";/
++"";/
++
"";/
++"";/
++"";/
++""
++
++% Week description, consists of three fields: