> Jamal Bengeloun wrote:
> Thanks a lot for your help. I thought I will be going mad with this. I 
> thought it had something to do with ruby being C based (I saw something 
> on the internet about the difference between Python and JPython and the 
> accented characters were encoded in UTF-8 and not html escaped).
> 
> What if the end rendering engine is not a browser (I checked and you're 
> absolutely right, it does work in a browser)? How to get true UTF-8 
> encoded characters instead of HTML escaped ones? I am using builder to 
> generate XML files from the data I get.
> 
> Thanks a lot for your explanation (it really did enlighten me) and your 
> help.
> 
> Jamal


It should be possible to convert CP437 - 
http://en.wikipedia.org/wiki/Code_page_437 - to UTF-8 using iconv.

iconv -l | grep -i CP437 # => 437 CP437 IBM437 CSPC8CODEPAGE437

"How to get true UTF-8 encoded characters instead of HTML escaped ones?"

This should be doable with http://htmlentities.rubyforge.org .

(For a Ruby & UTF-8 snippet btw see 
http://snippets.dzone.com/posts/show/4527 ).

Cheers,

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