diff options
author | Chris 'BinGOs' Williams <chris@bingosnet.co.uk> | 2011-01-01 10:37:04 +0000 |
---|---|---|
committer | Chris 'BinGOs' Williams <chris@bingosnet.co.uk> | 2011-01-01 10:37:04 +0000 |
commit | b85802c5d04fcd6e5c969a5c56136e05061f05d7 (patch) | |
tree | f616513e9f8d057e98b27d890a04aa4efbcf71b0 /cpan/Encode | |
parent | 361ed549eb6ef15e68e6bb16e020f11b7a29ebb2 (diff) | |
download | perl-b85802c5d04fcd6e5c969a5c56136e05061f05d7.tar.gz |
Update Encode to CPAN version 2.42
[DELTA]
$Revision: 2.42 $ $Date: 2010/12/31 22:48:48 $
! Encode.xs
! Unicode/Unicode.xs
Applied: RT#64371: Update for 5.14 API changes
http://rt.cpan.org/Ticket/Display.html?id=64371
Diffstat (limited to 'cpan/Encode')
-rw-r--r-- | cpan/Encode/Changes | 14 | ||||
-rw-r--r-- | cpan/Encode/Encode.pm | 4 | ||||
-rw-r--r-- | cpan/Encode/Encode.xs | 9 | ||||
-rw-r--r-- | cpan/Encode/META.yml | 2 | ||||
-rw-r--r-- | cpan/Encode/Unicode/Unicode.xs | 21 |
5 files changed, 38 insertions, 12 deletions
diff --git a/cpan/Encode/Changes b/cpan/Encode/Changes index 6434a3ad24..a8be386981 100644 --- a/cpan/Encode/Changes +++ b/cpan/Encode/Changes @@ -1,12 +1,18 @@ # Revision history for Perl extension Encode. # -# $Id: Changes,v 2.41 2010/12/23 11:05:58 dankogai Exp dankogai $ +# $Id: Changes,v 2.42 2010/12/31 22:48:48 dankogai Exp dankogai $ # -$Revision: 2.41 $ $Date: 2010/12/23 11:05:58 $ -lib/Encode/MIME/Header.pm +$Revision: 2.42 $ $Date: 2010/12/31 22:48:48 $ +! Encode.xs +! Unicode/Unicode.xs + Applied: RT#64371: Update for 5.14 API changes + http://rt.cpan.org/Ticket/Display.html?id=64371 + +2.41 2010/12/23 11:05:58 +! lib/Encode/MIME/Header.pm Applied: RT#63387 encode of MIME-Header inserts too much whitespace http://rt.cpan.org/Ticket/Display.html?id=63387 -t/Aliases.t lib/Encode/Alias.pm +! t/Aliases.t lib/Encode/Alias.pm Applied: RT#63286: Various Encode::Alias improvements http://rt.cpan.org/Ticket/Display.html?id=63286 diff --git a/cpan/Encode/Encode.pm b/cpan/Encode/Encode.pm index b5850f8da7..08887916c7 100644 --- a/cpan/Encode/Encode.pm +++ b/cpan/Encode/Encode.pm @@ -1,10 +1,10 @@ # -# $Id: Encode.pm,v 2.41 2010/12/23 11:05:00 dankogai Exp $ +# $Id: Encode.pm,v 2.42 2010/12/31 22:48:10 dankogai Exp $ # package Encode; use strict; use warnings; -our $VERSION = sprintf "%d.%02d", q$Revision: 2.41 $ =~ /(\d+)/g; +our $VERSION = sprintf "%d.%02d", q$Revision: 2.42 $ =~ /(\d+)/g; sub DEBUG () { 0 } use XSLoader (); XSLoader::load( __PACKAGE__, $VERSION ); diff --git a/cpan/Encode/Encode.xs b/cpan/Encode/Encode.xs index 1a672d6999..723170c27c 100644 --- a/cpan/Encode/Encode.xs +++ b/cpan/Encode/Encode.xs @@ -1,5 +1,5 @@ /* - $Id: Encode.xs,v 2.19 2010/09/18 18:39:51 dankogai Exp $ + $Id: Encode.xs,v 2.20 2010/12/31 22:48:48 dankogai Exp dankogai $ */ #define PERL_NO_GET_CONTEXT @@ -29,7 +29,12 @@ UNIMPLEMENTED(_encoded_utf8_to_bytes, I32) UNIMPLEMENTED(_encoded_bytes_to_utf8, I32) -#define UTF8_ALLOW_STRICT 0 +#ifdef UTF8_DISALLOW_ILLEGAL_INTERCHANGE +# define UTF8_ALLOW_STRICT UTF8_DISALLOW_ILLEGAL_INTERCHANGE +#else +# define UTF8_ALLOW_STRICT 0 +#endif + #define UTF8_ALLOW_NONSTRICT (UTF8_ALLOW_ANY & \ ~(UTF8_ALLOW_CONTINUATION | \ UTF8_ALLOW_NON_CONTINUATION | \ diff --git a/cpan/Encode/META.yml b/cpan/Encode/META.yml index a1b25e11a4..6ab4243d9a 100644 --- a/cpan/Encode/META.yml +++ b/cpan/Encode/META.yml @@ -1,6 +1,6 @@ --- #YAML:1.0 name: Encode -version: 2.41 +version: 2.42 abstract: ~ author: [] license: unknown diff --git a/cpan/Encode/Unicode/Unicode.xs b/cpan/Encode/Unicode/Unicode.xs index 9741626bd3..07d7e25f62 100644 --- a/cpan/Encode/Unicode/Unicode.xs +++ b/cpan/Encode/Unicode/Unicode.xs @@ -1,5 +1,5 @@ /* - $Id: Unicode.xs,v 2.6 2009/11/16 14:08:13 dankogai Exp $ + $Id: Unicode.xs,v 2.7 2010/12/31 22:48:48 dankogai Exp dankogai $ */ #define PERL_NO_GET_CONTEXT @@ -18,6 +18,16 @@ #define isLoSurrogate(x) (0xDC00 <= (x) && (x) <= 0xDFFF ) #define invalid_ucs2(x) ( issurrogate(x) || 0xFFFF < (x) ) +/* For pre-5.14 source compatibility */ +#ifndef UNICODE_WARN_ILLEGAL_INTERCHANGE +# define UNICODE_WARN_ILLEGAL_INTERCHANGE 0 +# define UTF8_DISALLOW_SURROGATE 0 +# define UTF8_WARN_SURROGATE 0 +# define UTF8_DISALLOW_FE_FF 0 +# define UTF8_WARN_FE_FF 0 +# define UTF8_WARN_NONCHAR 0 +#endif + #define PERLIO_BUFSIZ 1024 /* XXX value comes from PerlIOEncode_get_base */ /* Avoid wasting too much space in the result buffer */ @@ -255,7 +265,8 @@ CODE: resultbuflen = SvLEN(result); } - d = uvuni_to_utf8_flags(resultbuf+SvCUR(result), ord, 0); + d = uvuni_to_utf8_flags(resultbuf+SvCUR(result), ord, + UNICODE_WARN_ILLEGAL_INTERCHANGE); SvCUR_set(result, d - (U8 *)SvPVX(result)); } @@ -323,7 +334,11 @@ CODE: } while (s < e && s+UTF8SKIP(s) <= e) { STRLEN len; - UV ord = utf8n_to_uvuni(s, e-s, &len, 0); + UV ord = utf8n_to_uvuni(s, e-s, &len, (UTF8_DISALLOW_SURROGATE + |UTF8_WARN_SURROGATE + |UTF8_DISALLOW_FE_FF + |UTF8_WARN_FE_FF + |UTF8_WARN_NONCHAR)); s += len; if (size != 4 && invalid_ucs2(ord)) { if (!issurrogate(ord)) { |