Axel Etzold wrote:
>
> With respect to the code you sent me, I
> get:
> 
> require 'iconv'
> 
> s = "caf\xc3\xa9" #(having removed underscores)
>

First of all, even posting messages about unicode is hard to do because 
you have no idea what the other person is seeing.  For instance, when 
you say 'I see this output:

café

you have no idea how my display device is displaying those characters, 
and I have no idea how your display device is displaying those 
characters.  Does your display device not understand the encoding so 
there is a question mark at the end: caf?, and my display device does 
understand the encoding, so I see an 'e' with acute'? Or, do you see an 
'e' with acute, but I see a question mark?  You just can't be sure what 
the other person is seeing.  I used underscores intermingled with my 
character encodings to prevent *any* display device from rendering them. 
That way anyone reading the code will know exactly what's there.

As a result, to be clear what's going on, you don't want to be posting:

 s = "caf\xc3\xa9" #(having removed underscores)

You want to leave the underscores in when posting about character 
encodings.  Of course, when you run the code, you need to remove the 
underscores.

> 
> What system are you on ?
> Mine is Linux OpenSuse 10.2, 64bit, Ruby 1.8.6.
> If I had your behaviour on my system, this transliteration
> would provide a nice conversion of the accents to Latex,

mac os x 10.4.7, pre-installed ruby 1.8.2
-- 
Posted via http://www.ruby-forum.com/.