perl-unicode

Re: Change 16302: Provide the \N{U+HHHH} syntax before we forget.

2002-05-02 16:30:43
On Thu, May 02, 2002 at 08:01:34AM +0200, Philip Newton wrote:
On Wed, 1 May 2002 07:00:05 -0700, jhi(_at_)iki(_dot_)fi (Jarkko Hietaniemi) 
wrote:

Change 16302 by jhi(_at_)alpha on 2002/05/01 12:54:24

    Provide the \N{U+HHHH} syntax before we forget.

Do we also want to support U-HHHHHH? I seem to recall from somewhere

Hmmm.  One always learns something new... where did you find that format?

that U+HHHH went to U+FFFF and that code points beyond that were
U-HHHHHHHH (i.e. U+ form took 4 hex chars and U- form took 8 hex chars,
or something like that.)

+    return chr hex $1 if $arg =~ /^U\+([0-9a-fA-F]+)$/;

It would be a simple matter of replacing  \+  with  [-+]  .

Not world-shaking, just asking a question.

==== //depot/perl/toke.c#431 (text) ====
Index: perl/toke.c
--- perl/toke.c.~1~ Wed May  1 07:00:05 2002
+++ perl/toke.c     Wed May  1 07:00:05 2002
@@ -1540,6 +1540,16 @@
                    e = s - 1;
                    goto cont_scan;
                }
+               if (e > s + 2 && s[1] == 'U' && s[2] == '+') {

Oh, I suppose this would have to be changed to '&& (s[2] == '+' || s[2]
== '-')', too.

Cheers,
Philip

-- 
$jhi++; # http://www.iki.fi/jhi/
        # There is this special biologist word we use for 'stable'.
        # It is 'dead'. -- Jack Cohen

<Prev in Thread] Current Thread [Next in Thread>