Joerg Beekmann | 3 May 2005 00:52
Gravatar

[BUG] URLEncoder fails for many ISOLatin characters

Using VW7.3 or the April 25 build of 7.4  I'm having some trouble using 
the web tool kit to submit forms with  ASCII characters above 127.  For 
example putting "Joé" into a text inputfield on a form that will be 
processed by a servlet results in a "No character available" exception. 
I also went to JRobertsons blog (powered by VW I assume) and created a 
comment "Joé does not work" and clicking on preview. This resulted in 
"Joé does not work". And the message "There was a server error 
accepting your comment. Try enabling cookies." Based on (a bit) of 
research this does not seem to be normal web behaviour.

Looking the request and the problem and I see the browser has translated 
this string to 'Jo%E9', fair enough that seems to be the correct 
ISOLatin encoding. The problem is that
   URLEncoder decode: 'Jo%E9'
fails. This seems to fail because the encoder does not recognize this as 
a single byte character since the integer value is above 127!?

Is this a user error and if so how do I get around it. If not is there a 
patch available?


Gmane