On Thu, 29 Mar 2001 [EMAIL PROTECTED] wrote:

> Prymmer/Kahn <[EMAIL PROTECTED]> writes:
> >> And UTF-EBCDIC is _a_ UTF "8" - it is 8-bit and is UTF. It just isn't UTF-8.
> >
> >That is the problem I think: it is not UTF-8 and documentation that
> >mentions that encoding form could be construed as misleading for EBCDIC
> >platforms.  I'll take a look through the current pods to see...
> 
> I would gladdly 
> 
>    s/UTF-8/UTF-8 (UTF-EBCDIC on EBCDIC plafroms)/g
> 
> on all the pods 
> 
> if it meant we can carry on 
> 
>    use utf8;

I think we can use that on all platforms.  I am worried over the case
where someone will look at a bit of perl like so:

   open($FOO,":utf8",...);

then turn that into something that looks like:

   if ($^O eq 'os390') {
       open($FOO,":utfebcdic",...);
   }
   else {
       open($FOO,":utf8",...);
   }

I think that you have already mentioned that this ":utfebcdic" could be
yet another alias for ":utf8" via a mod to perlio.c.  There would not be
a need for a distinct utfebcdic.pm pragmatic module I don't think.

Would something along these lines be needed (just a copy of the utf8
PerlIO_funcs)?  Would it be sufficient?

--- perlio.c.orig       Thu Mar 29 10:18:59 2001
+++ perlio.c    Thu Mar 29 10:18:49 2001
@@ -1329,6 +1329,34 @@
  NULL, /* set_ptrcnt */
 };
 
+PerlIO_funcs PerlIO_utfebcdic = {
+ "utfebcdic",
+ sizeof(PerlIOl),
+ PERLIO_K_DUMMY|PERLIO_F_UTF8,
+ PerlIOUtf8_pushed,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL, /* flush */
+ NULL, /* fill */
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL, /* get_base */
+ NULL, /* get_bufsiz */
+ NULL, /* get_ptr */
+ NULL, /* get_cnt */
+ NULL, /* set_ptrcnt */
+};
+
 PerlIO_funcs PerlIO_byte = {
  "bytes",
  sizeof(PerlIOl),
End of Speculation.

> Shame, and there was me with a vision of an "Operator" somewhere 
> pressing a key to say "yes it is ok for that job to have another 32K" ;-) 

Hehe - more of a JES spool thing eh?

Peter Prymmer


Reply via email to