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?
rgds
Steve Callaway
···
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
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?
Thanks for your swift reply, don't feel $KCODE is the
issue but will play with it on the offchance, been
down the escape road though with no success. My
reading of the situation is the regexp parser in
common.rb can't see the chars and throws the URL out
on a (misguided) safety first basis.
rgds
Steve
···
--- Hal Fulton <hal9000@hypermetrics.com> wrote:
Steve Callaway wrote:
>
> There would appear to be a deficiency in the
common.rb
> URI module of uri when processing non-standard
> characters
[snip]
Hmm... what is your $KCODE set to, and are you
using the jcode lib?
I'm not certain uri honors those, but I would
certainly assume so...
Or maybe it's an issue where certain chars need
to be escaped...
Sorry, I'm not being very helpful, am I?
Hal
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
ah cool, thanks very much, that looks a much sweeter
fix
rgds
Steve
···
--- Carlos <angus@quovadis.com.ar> wrote:
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?
Thanks for your swift reply, don't feel $KCODE is
the
issue but will play with it on the offchance, been
down the escape road though with no success. My
reading of the situation is the regexp parser in
common.rb can't see the chars and throws the URL out
on a (misguided) safety first basis.
rgds
Steve
--- Hal Fulton <hal9000@hypermetrics.com> wrote:
> Steve Callaway wrote:
> >
> > There would appear to be a deficiency in the
> common.rb
> > URI module of uri when processing non-standard
> > characters
>
> [snip]
>
> Hmm... what is your $KCODE set to, and are you
> using the jcode lib?
>
> I'm not certain uri honors those, but I would
> certainly assume so...
>
> Or maybe it's an issue where certain chars need
> to be escaped...
>
> Sorry, I'm not being very helpful, am I?
>
>
> Hal
>
>
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam
protection around http://mail.yahoo.com
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
'Thus, only alphanumerics, the special characters "$-_.+!*'(),", and
reserved characters used for their reserved purposes may be used
unencoded within a URL.'
Paul.
···
On 07/07/06, Steve Callaway <sjc2000_uk@yahoo.com> wrote:
ah cool, thanks very much, that looks a much sweeter
fix
'Thus, only alphanumerics, the special characters "$-_.+!*'(),", and
reserved characters used for their reserved purposes may be used
unencoded within a URL.'
They may not necessarily be 'legal' nevertheless they
will turn up from time to time, particularly in
camelcased wiki & twiki links in Denmark, which is why
I need to be able to get them But you're right, it
isn't a fix, it is indeed the correct way of doing it,
but I was so happy to be able to kiss the problem
goodbye that I allowed a little terminological
inexactitude to creep in in my enthusiasm for the
resolution
rgds
Steve
···
--- Paul Battley <pbattley@gmail.com> wrote:
On 07/07/06, Steve Callaway <sjc2000_uk@yahoo.com> > wrote:
> ah cool, thanks very much, that looks a much
sweeter
> fix
It's not so much a fix as the right way to do it.
'Ø' isn't an allowed
character in URLs:
'Thus, only alphanumerics, the special characters
"$-_.+!*'(),", and
reserved characters used for their reserved purposes
may be used
unencoded within a URL.'
Paul.
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around