Re: accent in url parameter of DirectAction

Miguel Angel Torres Avila <[email protected]> Wed, 21 Jul 2010 12:48:51 -0500
Newsgroups gmane.comp.web.webobjects.devel
Message-ID <[email protected]>
Hi Pierre.

I think you should use

URLEncoder.encode("café", "UTF-8");

to set the parameter when calling the direct action.

In the Direct Action you should use something like

String menu =   
URLDecoder.decode(request().stringFormValueForKey("menu"), "UTF-8");

Tha way you should have no problems.

Hope this Helps.

On Jul 21, 2010, at 7:04 AM, Pierre Gilquin wrote:

> URLDecoder.decode(s) doesnot change anything !
>
> Any accentued characted (éàèç ...) is replaced by byte = 63 (???)
> I used this for a workaround :
>  I have replaced  63 with  *. That makes my db happy on my dev  
> windows machine but with the real deployment on linux, it doesnot  
> work.
>
>
> ----- Original Message -----
> From: Jérémy DE ROYER
> To: Pierre Gilquin
> Cc: [email protected]
> Sent: Wednesday, July 21, 2010 1:35 PM
> Subject: Re: accent in url parameter of DirectAction
>
> Why not using URLDecoder.decode(s) ?
>
> Jérémy
>
> Le 21 juil. 2010 à 12:58, Pierre Gilquin a écrit :
>
>> Thanks but it is worst, I get some %3F instead of any accentued  
>> character.
>>
>> ----- Original Message -----
>> From: Jérémy DE ROYER
>> To: Pierre Gilquin
>> Cc: [email protected]
>> Sent: Wednesday, July 21, 2010 12:33 PM
>> Subject: Re: accent in url parameter of DirectAction
>>
>> Hello,
>>
>> May be you can try : URLEncoder.encode(arg0);
>>
>> Jérémy
>>
>> Le 21 juil. 2010 à 12:31, Pierre Gilquin a écrit :
>>
>>> Hi all,
>>>
>>> I am working with iso-8859-1everywhere in my app (html and db).
>>> I have a DirectAction with parameters.
>>> When parameter has accent (ex : ../MyApp.woa/wa/MyDA?menu=café), I  
>>> dont get the correct word "café" in my java code.
>>> I know it is the same malediction from the begining of computer  
>>> with the limited ansi code.
>>>
>>> Any idea how to deal with this ?
>>> Thanks in advance.
>>> Pierre
>>>
>>> _______________________________________________
>>> WebObjects-dev mailing list
>>> [email protected]
>>> http://www.omnigroup.com/mailman/listinfo/webobjects-dev
>>
>> _______________________________________________
>> WebObjects-dev mailing list
>> [email protected]
>> http://www.omnigroup.com/mailman/listinfo/webobjects-dev
>
> _______________________________________________
> WebObjects-dev mailing list
> [email protected]
> http://www.omnigroup.com/mailman/listinfo/webobjects-dev



_______________________________
Ing. Miguel Angel Torres Avila

P Antes de imprimir, piense en el Medio Ambiente.

_______________________________________________
WebObjects-dev mailing list
[email protected]
http://www.omnigroup.com/mailman/listinfo/webobjects-dev