Forum: Ruby on Rails International char problem eg ä

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Dac7cee95370b90a2aad1f9b1e6ad839?d=identicon&s=25 Peter.Cutting (Guest)
on 2005-11-24 11:23
(Received via mailing list)
I have written a simple web proxy server which is currently choking on
links containing international characters.

Below is a fictitious link which my proxy server might find in a web
page(<IMG src="..."). It contains a &auml; (a with 2 dots) in the jpg
filename

http://www.qqqq.se/pics/b&auml;r.jpg

If my proxy sever tries to Get the page pointed to by the link then the
result is Page Not Found. If I paste the link into Firefox I again get
Page Not Found

If I change the &auml; to %E4 then it works in firefox (and I assume
Ruby)  eg

http://www.qqqq.se/pics/b%E4r.jpg

So I am looking for a function which converts HTML representations to
Hex in a string

I thought CGI.unencodeHTML might do the trick but it only converts a few
characters (HTML syntax I think) such as &lt; and &gt;

Any ideas?

Peter
This topic is locked and can not be replied to.