From: Austin Ziegler Date: 2006-06-15T01:17:17+09:00 Subject: Re: A plan for another unicode string hack On 6/14/06, Dae San Hwang wrote: > My proposed change won't disturb anyone's existing codes unless you > set $KCODE to be 'u' as well in that code. If you did set $KCODE to > 'u' in your previous projects, you don't have to apply this hack > (which hasn't been implemented yet) to that project. Um. PDF::Writer is a library, and I think that I use both depending on how the code reads. > Matz has said several times that he will maximize the breakage moving > to Ruby 2.0. If Matz is going to make these changes for Ruby 2.0, (as > implied in Guy Decoux's posting) I think I will just follow along. My > goal is to provide Ruby 2.0 forward compatible unicode support until > the move is complete. Yes, I undertstand. Making #size and #length return different values is a mistake. Without referring to documentation, how would you know which returns the number of characters and which one returns the number of bytes? They should always *either* return characters or bytes (preferably characters) and a separate call should be introduced for the alternative meaning. One that is explicit in its name to match its meaning. -austin -- Austin Ziegler * halostatue@gmail.com * http://www.halostatue.ca/ * austin@halostatue.ca * http://www.halostatue.ca/feed/ * austin@zieglers.ca