Hi Tobias,

Am 16.03.2007 um 14:03 schrieb Tobias Koller (GERMO GmbH):

> When I use escape() instead of encodeURIComponent or encodeURI then  
> it works!

Well, I'm afraid this is not really a solution. encodeURIComponent is  
the way to go!

The problem is that escape() only deals with 1-byte characters. This  
works with European languages (as long as the server and the client  
have the same idea about the encoding that is used, usually  
ISO-8859-1). However, it breaks badly with more complex charsets like  
Japanese. The only long-term solution that works with all languages  
is to use UTF-8 (which encodeURIComponent does).

> param is set to "testä".
>
> the alert shows me: "test%C3%A4"

This is exactly what should be sent to the server. It's your _server_  
code that should be changed (so it uses UTF-8 decoding for the  
params), not anything on the client side.

> But the request-param is "testä". I checked it with firebug.

I don't understand what you mean by that. The server should clearly  
receive "test%C3%A4" (as this is what gets passed to setData). What/ 
how exactly did you check with firebug?

> The js-File is saved as UTF-8.

This is irrelevant as there are no non-ASCII characters in your code  
snippet (only in user input).

Regards,

   Andreas


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to