[TYPO3-core] RFC: #3527: Bug: Wrongly encoded characters in mail form validation popup

Martin Kutschker masi-no at spam-typo3.org
Sat May 30 17:31:35 CEST 2009


Steffen Kamper schrieb:
> Hi,
> 
> Francois Suter schrieb:
>> Hi Ernesto,
>>
>> Thanks for the extensive testing.
>>
>>> So while this seems to solve the problem unter utf-8 when using
>>> latin-1-like characters, it is still broken with utf-8 and cyrill
>>> characters. :(
>>
>> :-(
>>
>> There are some bugs where you know why they have been open for so
>> long... I'll try to give it a shot again at some point in time.
>>
> 
> i also played with this yesterday, and your patch goes into the right
> direction. However, JS handles strings in utf-8, so there is of course a
> problem.

I think that browsers use UCS-2 internally. JS strings have of course to
be in the same charset as the whole html document. By testing I noticed
that browser (FF and IE) have no problem when you use Unicode codepoints
outside of the charset (using the \uXXXX notation).

> with renderCharset utf-8: printed strings plain, no problem
> any other remderCharset: plain is required.

So?

> HTML uses entities to render the strings. JS don't understand entities. rawurlencode is also wrong as
> JS can't interpret this. So having an entity like М JS will print
> it as it is, but would need unicode format like \x041C.

Not quite, it's \uXXXX in JS.

> I'm not sure how to convert it this way, but i'm pretty sure a condition for non-utf8
> renderCharset has to be done.

It shouldn't be necessary, but I have a look at Ernesto's problems.

Masi


More information about the TYPO3-team-core mailing list