This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
grok_bslash_o: Don't convert from native
authorKarl Williamson <public@khwilliamson.com>
Sun, 17 Jun 2012 17:57:02 +0000 (11:57 -0600)
committerKarl Williamson <public@khwilliamson.com>
Wed, 20 Jun 2012 20:08:40 +0000 (14:08 -0600)
This was and is a no-op on ASCII platforms, but on EBCDIC, when you did
e.g., a \o{7}, it would convert that to a 127.  But it did not do this
on a \007, giving inconsistent results.  Now, \o{7} yields 7, and thus
is consistent, and matches the documentation.

dquote_static.c

index f7f4a4f..02e39cf 100644 (file)
@@ -148,7 +148,7 @@ S_grok_bslash_o(pTHX_ const char *s,
        return FALSE;
     }
 
-    *uv = NATIVE_TO_UNI(grok_oct(s, &numbers_len, &flags, NULL));
+    *uv = grok_oct(s, &numbers_len, &flags, NULL);
     /* Note that if has non-octal, will ignore everything starting with that up
      * to the '}' */