From: Michal Suchanek Date: 2006-06-15T22:19:03+09:00 Subject: Re: A plan for another unicode string hack On 6/15/06, Julian 'Julik' Tarkhanov wrote: > > On 15-jun-2006, at 6:13, Suraj N. Kurapati wrote: > > > -----BEGIN PGP SIGNED MESSAGE----- > > Hash: SHA1 > > > > Dae San Hwang wrote: > >> The reason I'm differentiating between 'size' and 'length' is because > >> some libraries (like rails) depend on them returning the byte size of > >> the string. Maybe we can establish a customs that 'size' for byte > >> size > >> and 'length' for the number of characters. Same reasoning goes for > >> '[]' > >> and 'slice'. > > > > Good idea. This separation of 'length' and 'size' methods is quite > > reasonable, in my opinion. > > To the original poster - frankly I don't see the point of doing this > all over again. If you want to have unicode handling > that way just grab it from my plugin. It's just that when you have to > work with external libraries they > will not cooperate. I was using this String class in the wild for a > few months, so trust me. It's not simply > because I "felt" like removing this functionality - it simply Broke > Alot Of Stuff In A Variety Of Subtle Ways. > It needs to be fixed for ruby 2.0 anyway. IO and some networking stuff would need to be fixed to use byte_size I guess. For me IO is sufficient for now. Thanks Michal