Quoting James Edward Gray II <james / grayproductions.net>:

> On Aug 4, 2006, at 8:58 AM, M. Edward (Ed) Borasky wrote:
>
> > Leslie Viljoen wrote:
> >> On 8/4/06, Logan Capaldo <logancapaldo / gmail.com> wrote:
> >>> .
> >>> >
> >>> > On an unrelated note, I think I discovered a bug in 1.9:
> >>> >
> >>> > ?q => 'q' # should be 113, right?
> >>> >
> >>> > Regards,
> >>> >
> >>> That's not a bug, it's a feature! Ruby 1.9 is on the path to 2.0
> >>> which gets rid of the whole 1 byte == 1 character thing.
> >>
> >> I cannot tell you how annoying it is to work with binary data strings
> >> in C# when everything is unicode. Can the new Ruby support old
> >> 1byte =
> >> 1character strings as well?
> >>
> >>
> >> Les
> >>
> >>
> > Or do what Perl did: have "byte semantics" and "character
> > semantics" and have a "pragma" that allows switching between the
> > two. I forget whether Perl does it at "compile" time or run
> > time ... for Ruby, run time would be the obvious choice, I think.
> >
> > This bit me once on Perl. I had a program with a byte constant and
> > a Perl upgrade broke a comparison for equality when the default
> > switched from byte semantics to character semantics. Bah!
>
> What do you do when you need both semantics in the same program?
>
> James Edward Gray II

I don't know ... I only needed byte semantics in the broken one, and I never got
around to reading any further in the documentation to see if it was selectable
at run time. Selectable at run time is obviously the way to go in a "scripting"
language, but I have no idea what the Perl folks did.

As I've noted before, I use Perl only for its original purpose (Practical
Extraction and Reporting Language), not as a "general purpose" tool for large
programs or as a component in a web server. 99% of my Perl code was written
with and will still run with Perl 4. :)