Daniel Richard G. dixit:

>While UTF-8 isn't a thing in the z/OS environment, I think there could
>be value in printing something that will be converted by the existing
>EBCDIC->ASCII terminal/NFS conversion into correctly-formed UTF-8
>characters.
[…]
>in the terminal. Effectively an ASCII->EBCDIC->ASCII round trip.

While I still cringe at the way you Mainframe types (also the IBM
docs I read) write ASCII and mean 8-bit charsets, yes, that’s exactly
what I was thinking about.

>I don't know if there are use cases where this may yield unintuitive
>results... perhaps if this "nega-UTF-8" were redirected to a file and
>then processed further in z/OS, that may lead to some surprises. But in

That was *also* what I was thinking about. But then I remembered (and
this is why I replied to the old thread for this) that you said that
UTF-8 is rarely seen and UTF-EBCDIC isn’t seen at all and UCS-{2,4}
is just used on the system if needed.

>terms of doing something sensible when using a "\uNNNN" escape in an
>environment that shouldn't support it, it seems no worse than producing
>actual UTF-8 bytes.

Indeed — especially if you have an autoconvert layer between that
and the devices you interact with the mainframe with.

Of course, ASCII-mksh on z/OS would do away with all this; out of
curiosity, IIRC you said something about wanting to create an ASCII
environment for z/OS, have you come any closer to that?

(There’s that added data point of \uXXXX on EBCDIC-mksh writing
stuff to local files that ASCII-mksh could not read… unless it
were able to access the files “as if” they were autoconverted to
extended ASCII. Oh well, or just use iconv…)

So, to summarise, I believe we both agree in saying that this
(botch \uXXXX (and base-1 integers in utf8-mode) to output not
UTF-8 but UTF-8-converted-as-extended-ASCII-to-EBCDIC) makes
sense, or, at least, more than not doing it?

Thanks,
//mirabilos
-- 
>> Why don't you use JavaScript? I also don't like enabling JavaScript in
> Because I use lynx as browser.
+1
        -- Octavio Alvarez, me and ⡍⠁⠗⠊⠕ (Mario Lang) on debian-devel

Reply via email to