From: Carlos Date: 2006-07-07T16:33:49+09:00 Subject: Re: Danish Characters in Ruby Uri Steve Callaway wrote: > Hi, > > There would appear to be a deficiency in the common.rb > URI module of uri when processing non-standard > characters > > e.g. > > c:/ruby/lib/ruby/1.8/uri/common.rb:432:in `split': bad > URI(is not URI?): http:// > fakebase/twiki/bin/view/Main/�stermark > (URI::InvalidURIError) > from c:/ruby/lib/ruby/1.8/uri/common.rb:481:in `parse' > from c:/ruby/lib/ruby/1.8/open-uri.rb:85:in `open' > from testbed.rb:15 > > I have chcped till I am blue in the face, gsubbed the > string, etc, etc, but the uri parser won't have some > Danish characters in any shape or form. Anyone have > any idea how I can persuade uri to take them, or some > other viable method of getting a page back with Danish > chars in it, or am I going to have to hack my local > copy of common.rb apart to make this happen? Just apply URI.encode first. That will change the URI to http://fakebase/twiki/bin/view/Main/%C3%98stermark (or something different if you are not using UTF-8), which is valid. Good luck.