Probably. I am a beginner in ruby.

The program gets the accented characters from a dBaseIV file, a MS 
Access File and some YAML files.

I use Komodo Edit as my editor and it does handle UTF-8 correctly.

I know! That's why I did not understand why I got \202. I do not know 
which charset ruby uses to convert the characters. I tried iconv and 
jcode but ended up with the same results. At first I thought it was 
because of the library I used (builder for example). The only 
explanation I found was on that python tutorial.

Thanks.

Jamal

mortee wrote:
> Jamal Bengeloun wrote:
>> ?? gets translated to \205
>> ù gets translated to \227
>> 
>> But why?
> 
> I guess that your understanding is just wrong. I'm not really sure from
> where your program gets those accented chars that are translated to
> those specific escaped octal sequences. But if you're specifying them in
> string constants in your program, then it all depends on according to
> what encodig your editor displays it.
> 
> For instance, I usually edit my scripts as UTF-8 text files, and I treat
> my sting constants that way too. In that case, if I put an é in a string
> constant, it gets interpreted as \303\251, and not as \202. It's just
> the octal representation of the byte(s) your editor displays as a
> specific accented character.
> 
> mortee

-- 
Posted via http://www.ruby-forum.com/.