[Typo3-dev] problem with JS escape() and UTF-8 (on IE)
Martin T. Kutschker
Martin.no5pam.Kutschker at blackbox.n0spam.net
Sat Aug 28 13:32:32 CEST 2004
Toni Milovan wrote:
> On Sub, 2004-08-28 at 12:47, Martin T. Kutschker wrote:
>
>>Which is fine as a workaround. But IMHO we should decide which browsers
>>to support for charsets different from iso-8859-1/windows-1252. That is
>>if we cannot find a generak solution.
>
> Well I have to strongly dissagree.
I think you misundertstood me. I was not saying to ignore all other
charsets.
IMHO we should try to support as many charsets on as many browsers as
possible.
> I really believe there should be supported all charsets for which there
> is language in typo3 on all major browsers: Mozilla, Opera, IE, major
> mac ones. Otherwise typo3 can be rendered unusable in that language.
Of course, but it has to be technically feasible.
Issues:
JS escape() - different behaviour on older and newer browsers
JS decodeURIComponent - only supported by newer browsers
So if we only use decodeURIComponent() we're safe for all charsets. We
just have to keep in mind that we need to convert from ant to UTF-8.
Which is possible in Typo3. But for older clients this won't work.
If we use escape() we have to do browser sniffing. And of course we need
functions that do JS-style escaping. PHP urlencode() is not compatible
with ECMA-262 escape().
So to repeat myself, we either have to rely on browser sniffing or
support only newer browsers for charsets other than iso-8859-1.
Masi
More information about the TYPO3-dev
mailing list