[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Erw-devel] MS IE vs. Mozilla - UTF?
From: |
erw-devel |
Subject: |
Re: [Erw-devel] MS IE vs. Mozilla - UTF? |
Date: |
06 Sep 2003 13:07:42 +0200 |
On Fri, 2003-09-05 at 07:52, address@hidden wrote:
> I'll see what I can do about un-munging stuff from IE -- til then,
> Mozilla's the chosen browser for our campus. =)
OK, I got now a clearer picture. escape() is specified in the ECMA only
for ISO Latin 1 characters.
Mozilla's escape() is extended to Unicode characters following W3C's
recommendation on URI encoding: first translate to UTF-8 and then %-code
each byte. Note however that this is done only if beyond-Latin-1
characters are met, so it is not really a good idea. IE's escape(),
instead, translates Unicode characters to %uXXXX, an even worse idea.
The solution is to use escape() or encodeURIComponent() (it's JS 1.5)
depending on the UTF-8-ness of the system. I did not know about
encodeURIComponent--my fault. It is already fixed in my version.
If you want a fast fix to use filters, just replace escape() in
buildQuery() in formjs.php with encodeURIComponent().
Ciao,
seba