This is the mail archive of the glibc-cvs@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]

GNU C Library master sources branch master updated. glibc-2.24-424-g0415d32


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  0415d32187731ac03ef6c72c6cfb25314d4b0133 (commit)
      from  a09411756fd935482a81e99dc3f3eae99843d012 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=0415d32187731ac03ef6c72c6cfb25314d4b0133

commit 0415d32187731ac03ef6c72c6cfb25314d4b0133
Author: Florian Weimer <fweimer@redhat.com>
Date:   Tue Nov 29 18:35:12 2016 +0100

    gconv: Adjust GBK to support the Euro sign
    
    Commit aa4d00ca39e604ac4e9fead401ccd4483e11a281 only updated the
    data used by locales.

diff --git a/ChangeLog b/ChangeLog
index 92c96c1..1ae7181 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2016-11-29  Florian Weimer  <fweimer@redhat.com>
+
+	* iconvdata/gbk.c (BODY): Add Euro sign support (both directions).
+
 2016-11-29  Yury Norov  <ynorov@caviumnetworks.com>
 	    Steve Ellcey  <sellcey@caviumnetworks.com>
 
diff --git a/iconvdata/gbk.c b/iconvdata/gbk.c
index fc32a50..8e12e95 100644
--- a/iconvdata/gbk.c
+++ b/iconvdata/gbk.c
@@ -13148,8 +13148,17 @@ static const char __gbk_from_ucs4_tab12[][2] =
       if (__builtin_expect (ch <= 0x80, 0)				      \
 	  || __builtin_expect (ch > 0xfe, 0))				      \
 	{								      \
-	  /* This is illegal.  */					      \
-	  STANDARD_FROM_LOOP_ERR_HANDLER (1);				      \
+	  if (__glibc_likely (ch == 0x80))				      \
+	    {								      \
+	      /* Exception for the Euro sign (see CP936).  */		      \
+	      ch = 0x20ac;						      \
+	      ++inptr;							      \
+	    }								      \
+	  else								      \
+	    {								      \
+	      /* This is illegal.  */					      \
+	      STANDARD_FROM_LOOP_ERR_HANDLER (1);			      \
+	    }								      \
 	}								      \
       else								      \
 	{								      \
@@ -13292,6 +13301,10 @@ static const char __gbk_from_ucs4_tab12[][2] =
 	case 0x2010 ... 0x203b:						      \
 	  cp = __gbk_from_ucs4_tab4[ch - 0x2010];			      \
 	  break;							      \
+	case 0x20ac:							      \
+	  /* Exception for the Euro sign (see CP396).  */		      \
+	  cp = "\x80";							      \
+	  break;							      \
 	case 0x2103 ... 0x22bf:						      \
 	  cp = __gbk_from_ucs4_tab5[ch - 0x2103];			      \
 	  break;							      \

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog       |    4 ++++
 iconvdata/gbk.c |   17 +++++++++++++++--
 2 files changed, 19 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
GNU C Library master sources


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