In perl.git, the branch khw/ebcdic has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/6a52731a1bc50adc8b39e55a171ca8c5858e2668?hp=c511125472f20a1cbfa71835985f953eb50081de>

- Log -----------------------------------------------------------------
commit 6a52731a1bc50adc8b39e55a171ca8c5858e2668
Author: Karl Williamson <[email protected]>
Date:   Fri Apr 12 22:41:40 2013 -0600

    XXX rebase

M       perlio.c
M       toke.c

commit e85dfae1bfc06c7dbbd5221daa58bef7fb17917e
Author: Karl Williamson <[email protected]>
Date:   Fri Apr 12 22:29:31 2013 -0600

    XXX rebase

M       toke.c
-----------------------------------------------------------------------

Summary of changes:
 perlio.c |    4 ++--
 toke.c   |   14 +++++---------
 2 files changed, 7 insertions(+), 11 deletions(-)

diff --git a/perlio.c b/perlio.c
index 7046c0a..7beb47f 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 U8 CR = LATIN1_TO_NATIVE(0xd);
-static U8 LF = LATIN1_TO_NATIVE(0xa);
+static U8 CR = 13;
+static U8 LF = 21;
 
 
 #ifndef USE_SFIO
diff --git a/toke.c b/toke.c
index ab074f3..e1697e3 100644
--- a/toke.c
+++ b/toke.c
@@ -3460,17 +3460,13 @@ S_scan_const(pTHX_ char *start)
                            has_utf8 = TRUE;
                        }
 
-#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.  */
+                        /* Add the (Unicode) code point to the output. */
                        if (UNI_IS_INVARIANT(uv)) {
-                           *d++ = (char) uv;
+                           *d++ = (char) LATIN1_TO_NATIVE(uv);
                        }
-                       else d = (char*)uvchr_to_utf8((U8*)d, uv);
+                       else {
+                            d = (char*) uvoffuni_to_utf8_flags((U8*)d, uv, 0);
+                        }
                    }
                }
                else /* Here is \N{NAME} but not \N{U+...}. */

--
Perl5 Master Repository

Reply via email to