James Gray
3/11/2008 12:49:00 PM
On Mar 10, 2008, at 10:29 PM, 7stud -- wrote:
> James Gray wrote:
>> On Mar 10, 2008, at 10:00 AM, 7stud -- wrote:
>>
>>>> Jose Martin
>>>
>>> Ruby does not support unicode.
>>
>> Really?
>>
>> $ ruby -KU -r jcode -e 'p "R=E9sum=E9".jsize'
>> 6
>>
>> James Edward Gray II
>
> How does that prove the ruby supports unicode?
If the code was not character aware, it would have returned a count of =20=
the bytes in the String (more than six). String#size, for example.
> Where are there any unicode characters in your string?
I entered the accented e characters in UTF-8, that's why you see the -=20=
KU switch to tell Ruby the encoding.
James Edward Gray II