Dan Sugalski <[EMAIL PROTECTED]> writes:
>>This the main pain with 5.7.*'s EBCDIC scheme - making
>>
>> ord('A') == 193
>>
>>true :-/
>
>That would be true if EBCDIC was the default encoding, otherwise false.
But what about
our $var;
{
use encoding 'US-ascii';
$var = 'A';
}
{use Encoding 'ibm-1047'; # EBCDIC
if (ord($var) == 193)
{
}
else
{
}
}
>>You are going to see both used in legacy stuff.
>
>No doubt. Hopefully that'll go away as people are in a position to force
>things the way they want them.
A. World has been de-facto ASCII for years - even Japanese codings
make it easy - but EBCDIC is still there.
B. But do they want them the way we want them?
>I don't see any reason not to have the encoding lexically scoped and
>settable via use. Probably either "use encoding qw(EBCDIC);" or "use
>ebcdic;". The former would be easier to extend, but it's Larry's call.
Remember that Larry's initial idea was 'use utf8' was going to be
lexical. Then reality kicked in and we had to tag the data to retain
our sanity and "zillions" of spots needed tweaking to translate
on demand.
So if you want lexical scoped encoding make sure the infrastructure
can scale to cope...
--
Nick Ing-Simmons