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!