perl-unicode

Re: gmake (perl-5.8.6) fails on z/OS

2005-07-26 08:06:27
On Tue, Jul 26, 2005 at 07:55:21AM -0700, rajarshi das wrote:

The change is in the fn Perl_utf8n_to_uvuni :
-------------------
.....
....

#define UTF8_WARN_LONG                           8
#define UTF8_WARN_FFFF                           9 /*
Also FFFE. */

    if (curlen == 0 &&
        !(flags & UTF8_ALLOW_EMPTY)) {
        warning = UTF8_WARN_EMPTY;
        goto malformed;
    }
#ifdef EBCDIC   /* the change */
      uv = NATIVE_TO_UTF(uv);
#endif          /* the change ends here */

    if (UTF8_IS_INVARIANT(uv)) {
        if (retlen)
            *retlen = 1;
        return (UV) (NATIVE_TO_UTF(*s));
    }
....
...


A context or unified diff with the original source would have been clearer,
at least in part because most people on the list are used to it.

I don't understand this code, so I don't know why. I think that part of the
reason that you're getting few to no responses to your questions is because
few people understand this code in the first place, and none of them
understand how it interacts with EBCDIC.


The only thing I can think of is that I notice that further down that function
there is:

#ifdef EBCDIC
    uv = NATIVE_TO_UTF(uv);
#else
    if ((uv == 0xfe || uv == 0xff) &&
        !(flags & UTF8_ALLOW_FE_FF)) {
        warning = UTF8_WARN_FE_FF;
        goto malformed;
    }
#endif

Is that second call to NATIVE_TO_UTF still present in your modified code?

Nicholas Clark