[Seaside] WAUrlEncoder

Julian Fitzell jfitzell at gmail.com
Fri Feb 6 14:56:20 UTC 2009


It's not quite as straightforward as always using UTF-8, unfortunately
(actually there basically isn't a *right* answer that is guaranteed to work
everywhere). But if you are using UTF-8 as your page encoding you should be
using it to encode URLs before percent escaping. WAUrlEncoder in 2.9 does
this but it looks like the one in 2.8 doesn't.

There has been a bunch of discussion about encodings on the development list
in the past few weeks. Encodings + the web = a mess, really. :)

Julian

On Fri, Feb 6, 2009 at 3:46 PM, Karsten <karsten at heeg.de> wrote:

> Hi,
>
> today I had a problem with non-ascii characters in the URL. The reason for
> this problem seemed to be that URLs are encoded in a different way as they
> are decoded. Encoding is done with WAUrlEncoder and decoding is done with
> URLEncoder (at least on VisualWorks). The URLEncoder uses UTF8 to
> encode/decode URLs, but the WAUrlEncoder stores characters bytewise with %.
> So if you encode 'ü' (252 as Integer) with WAUrlEncoder you get '%FC', while
> the URLEncoder produces '%C3%BC'.
>
> If the URLEncoder is also used for encoding everything works fine and even
> the browser shows the characters properly in the address bar. I'm not sure
> if that's just a problem of the VW port, but still I don't understand why
> the WAUrlEncoder doesn't encode with UTF8, even though that's recommented in
> the rfc (at least that's what Wikipedia said ;-) ).
>
> Kind Regards
> Karsten
>
> --
> Karsten Kusche - Dipl.Inf. - karsten at heeg.de
> Tel: +49 3496 21 43 29
> Georg Heeg eK - Köthen
> Handelsregister: Amtsgericht Dortmund A 12812
>
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20090206/d6ced8f7/attachment.htm


More information about the seaside mailing list