[Typo3-dev] Charset Bug ?
Kasper Skårhøj
kasper2005 at typo3.com
Tue Mar 22 17:39:56 CET 2005
Hi Bernhard,
It will be wrong to substitute rawurlencode with addslashes since
"unescape" is the javascript opposite to rawurlencode. So they are
incompatible.
Maybe your solution works for you but I fear it will not work for
others. I had to convert chars to a series of UNICODE values for getting
this to work in the backend for localization so it is most like much
more complex to solve the problem generally.
- kasper
On Thu, 2005-03-10 at 00:27, Kraft Bernhard wrote:
> Hallo,
>
> I think I've found a bug. This one just occurs when forceCharset is set
> to utf-8.
>
> I think affected are all "plugin.feadmin." forms. pherhaps even other.
> German Umlauts get converted to a 2-character string. this occurs even
> if i set a default value via:
> plugin.feadmin.fe_users.create.defaultValues.country = Österreich
>
> The problem is that the POSTed/configured strings/characters get encoded in
> class.tslib_content.php in line 5679:
>
> $JSPart.="
> updateForm('".$formName."','".$arrPrefix."[".$fKey."][]',unescape('".rawurlencode($Nvalue)."'))";
>
> Either the rawurlencode or the unescape (or both together) are breaking the forms.
>
> I propose to change the "rawurlencode" to "addslashes". As we are in a JavaScript String every
> character is allowed except the one which quotes the string. This worked for me.
>
> Any chance to see this in 3.8 ?
>
> I use utf-8 on almost all my sites now.
>
>
> greets,
> Bernhard
--
- kasper
*******************
Happy new year! - My email address is now:
kasper2005 at typo3.com
More information about the TYPO3-dev
mailing list