In perl.git, the branch khw/ebcdic has been updated <http://perl5.git.perl.org/perl.git/commitdiff/c511125472f20a1cbfa71835985f953eb50081de?hp=0bee43009979659909907a2e17d43d2fc03fb5af>
- Log ----------------------------------------------------------------- commit c511125472f20a1cbfa71835985f953eb50081de Author: Karl Williamson <[email protected]> Date: Fri Apr 12 07:53:04 2013 -0600 XXX rebase ----------------------------------------------------------------------- Summary of changes: perlio.c | 4 ++-- toke.c | 11 ++++++++--- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/perlio.c b/perlio.c index 5d757ea..7046c0a 100644 --- a/perlio.c +++ b/perlio.c @@ -130,8 +130,8 @@ extern int fseeko(FILE *, off_t, int); extern off_t ftello(FILE *); #endif -static const U8 CR = LATIN1_TO_NATIVE(0xd); -static const U8 LF = LATIN1_TO_NATIVE(0xa); +static U8 CR = LATIN1_TO_NATIVE(0xd); +static U8 LF = LATIN1_TO_NATIVE(0xa); #ifndef USE_SFIO diff --git a/toke.c b/toke.c index 2c6a266..ab074f3 100644 --- a/toke.c +++ b/toke.c @@ -3460,12 +3460,17 @@ S_scan_const(pTHX_ char *start) has_utf8 = TRUE; } - /* Add the code point to the output. Note that it is a - * Unicode and not a native value */ +#ifdef EBCDIC + /* Note that the input is Unicode and hence must be + * converted to native */ + uv = UNI_TO_NATIVE(uv); +#endif + + /* Add the code point to the output. */ if (UNI_IS_INVARIANT(uv)) { *d++ = (char) uv; } - else d = (char*)uvchr_to_utf8((U8*)d, UNI_TO_NATIVE(uv)); + else d = (char*)uvchr_to_utf8((U8*)d, uv); } } else /* Here is \N{NAME} but not \N{U+...}. */ -- Perl5 Master Repository
