Skip to content

PATCH for 5.16.1: Correct Unicode's 6.1 typo #12199

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
p5pRT opened this issue Jun 19, 2012 · 4 comments
Closed

PATCH for 5.16.1: Correct Unicode's 6.1 typo #12199

p5pRT opened this issue Jun 19, 2012 · 4 comments

Comments

@p5pRT
Copy link

p5pRT commented Jun 19, 2012

Migrated from rt.perl.org#113742 (status was 'resolved')

Searchable as RT113742$

@p5pRT
Copy link
Author

p5pRT commented Jun 19, 2012

From @khwilliamson

This is a bug report for perl from khw@​karl.(none),
generated with the help of perlbug 1.39 running under perl 5.16.0.


The attached patch fixes the typo in the Unicode 6.1 data files to be
applied on 5.16.0



Flags​:
  category=core
  severity=high


Site configuration information for perl 5.16.0​:

Configured by khw at Mon Jun 18 20​:03​:57 MDT 2012.

Summary of my perl5 (revision 5 version 16 subversion 0) configuration​:
  Commit id​: 7ef715807cc88c6c09962fd867b2cd1563b5565c
  Platform​:
  osname=linux, osvers=2.6.35-32-generic-pae,
archname=i686-linux-thread-multi-64int-ld
  uname='linux karl 2.6.35-32-generic-pae #67-ubuntu smp mon mar 5
21​:23​:19 utc 2012 i686 gnulinux '
  config_args='-des -Dprefix=/home/khw/devel -Dusedevel
-D'optimize=-ggdb3' -A'optimize=-ggdb3' -A'optimize=-O0' -Dman1dir=none
-Dman3dir=none -DDEBUGGING -Dcc=g++ -Dusemorebits -Dusethreads'
  hint=recommended, useposix=true, d_sigaction=define
  useithreads=define, usemultiplicity=define
  useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
  use64bitint=define, use64bitall=undef, uselongdouble=define
  usemymalloc=n, bincompat5005=undef
  Compiler​:
  cc='g++', ccflags ='-D_REENTRANT -D_GNU_SOURCE -DDEBUGGING
-fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
  optimize='-O0 -ggdb3',
  cppflags='-D_REENTRANT -D_GNU_SOURCE -DDEBUGGING
-fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include'
  ccversion='', gccversion='4.4.5', gccosandvers=''
  intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=12345678
  d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
  ivtype='long long', ivsize=8, nvtype='long double', nvsize=12,
Off_t='off_t', lseeksize=8
  alignbytes=4, prototype=define
  Linker and Libraries​:
  ld='g++', ldflags =' -fstack-protector -L/usr/local/lib'
  libpth=/usr/local/lib /lib/../lib /usr/lib/../lib /lib /usr/lib
/usr/lib/i686-linux-gnu
  libs=-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
  perllibs=-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
  libc=/lib/../lib/libc.so.6, so=so, useshrplib=false, libperl=libperl.a
  gnulibc_version='2.12'
  Dynamic Linking​:
  dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
  cccdlflags='-fPIC', lddlflags='-shared -ggdb3 -ggdb3 -O0
-L/usr/local/lib -fstack-protector'

Locally applied patches​:


@​INC for perl 5.16.0​:
  /home/khw/perl/5.16maint/lib

/home/khw/devel/lib/perl5/site_perl/5.16.0/i686-linux-thread-multi-64int-ld
  /home/khw/devel/lib/perl5/site_perl/5.16.0
  /home/khw/devel/lib/perl5/5.16.0/i686-linux-thread-multi-64int-ld
  /home/khw/devel/lib/perl5/5.16.0
  /home/khw/devel/lib/perl5/site_perl
  .


Environment for perl 5.16.0​:
  HOME=/home/khw
  LANG=en_US.UTF-8
  LANGUAGE=en_US​:en
  LD_LIBRARY_PATH (unset)
  LOGDIR (unset)

PATH=/home/khw/bin​:/home/khw/print/bin​:/bin​:/usr/local/sbin​:/usr/local/bin​:/usr/sbin​:/usr/bin​:/sbin​:/usr/games​:/home/khw/cxoffice/bin
  PERL5OPT=-w
  PERL_BADLANG (unset)
  SHELL=/bin/ksh

@p5pRT
Copy link
Author

p5pRT commented Jun 19, 2012

From @khwilliamson

0001-mktables-Handle-typo-in-Unicode-6.1-data-file.patch
From 7ef715807cc88c6c09962fd867b2cd1563b5565c Mon Sep 17 00:00:00 2001
From: Karl Williamson <[email protected]>
Date: Wed, 23 May 2012 17:14:36 -0600
Subject: [PATCH] mktables: Handle typo in Unicode 6.1 data file

Unicode has published a correction to their data files for version 6.1.
This patch applies that correction.
---
 lib/Unicode/UCD.t    |    3 +++
 lib/unicore/mktables |    3 +++
 pod/perldelta.pod    |    7 +++++++
 3 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/lib/Unicode/UCD.t b/lib/Unicode/UCD.t
index 638a1d8..2e5a741 100644
--- a/lib/Unicode/UCD.t
+++ b/lib/Unicode/UCD.t
@@ -708,6 +708,9 @@ while (<$propvalues>) {
     next if /^\s* $/x;    # Ignore empty and comment lines
     chomp;
 
+    # Fix typo in official input file
+    s/CCC133/CCC132/g if $version eq "6.1.0";
+
     my @fields = split /\s*;\s*/; # Fields are separated by semi-colons
     my $prop = shift @fields;   # 0th field is the property,
     my $count = 0;  # 0th field in line (after shifting off the property) is
diff --git a/lib/unicore/mktables b/lib/unicore/mktables
index 7eba4f9..458d4ec 100644
--- a/lib/unicore/mktables
+++ b/lib/unicore/mktables
@@ -9156,6 +9156,9 @@ sub process_PropValueAliases {
     # Process each line of the file ...
     while ($file->next_line) {
 
+        # Fix typo in input file
+        s/CCC133/CCC132/g if $v_version eq v6.1.0;
+
         my ($property, @data) = split /\s*;\s*/;
 
         # The ccc property has an extra field at the beginning, which is the
diff --git a/pod/perldelta.pod b/pod/perldelta.pod
index 3b26bf5..6d45cc0 100644
--- a/pod/perldelta.pod
+++ b/pod/perldelta.pod
@@ -4156,6 +4156,13 @@ started [perl #37033].
 C<< die; >> with a non-reference, non-string, or magical (e.g., tainted)
 value in $@ now properly propagates that value [perl #111654].
 
+=item *
+
+Unicode 6.1 published an incorrect alias for one of the
+Canonical_Combining_Class property's values (which range between 0 and
+254).  The alias C<CCC133> should have been C<CCC132>.  Perl now
+overrides the data file furnished by Unicode to give the correct value.
+
 =back
 
 =head1 Known Problems
-- 
1.7.7.1

@p5pRT
Copy link
Author

p5pRT commented Jun 21, 2012

From @rjbs

applied with tentative sha1 of c29a8c7; might be rebased/etc

@p5pRT
Copy link
Author

p5pRT commented Jun 21, 2012

@rjbs - Status changed from 'new' to 'resolved'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant