Afficher un message
Vieux 11/03/2008, 18h35   #8
Todd Benson
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Reding unicode characters?

On Tue, Mar 11, 2008 at 7:49 AM, James Gray <james@grayproductions.net> wro=
te:
>
> If the code was not character aware, it would have returned a count of
> 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 -
> KU switch to tell Ruby the encoding.
>
> James Edward Gray II


I think this may have been discussed before, but -KU doesn't work for
me on Windows XP. I get an unterminated string error with the
"R=E9sum=E9" UTF-8 encoded string. I can only assume that the parser is
still interpreting the string as one byte per character. Anyone have
any ideas?

Todd

  Réponse avec citation
 
Page generated in 1,89031 seconds with 9 queries