• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Http Adaptor and UTF-8 encoded URL
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Http Adaptor and UTF-8 encoded URL


  • Subject: Re: Http Adaptor and UTF-8 encoded URL
  • From: Chuck Hill <email@hidden>
  • Date: Thu, 24 May 2007 09:32:50 -0700


On May 24, 2007, at 5:13 AM, Alexis Tual wrote:

Hello everyone,

i've localized an application, turning all in UTF-8 with the help of the mighty Practical WO (chapter 8).
All works fine, except the URLs encoded in UTF-8.
I've added the WOURLEncoding=UTF-8 in all my URLs and WOMessage.setDefaultURLEncoding("UTF8") in Application's constructor.
This works fine in development but doesn't work in deployment on an another server.


I found out that in deployment the Http Adaptor decodes (with a certain charset) directly the parameters whereas in development mode
the Adaptor just transmits the URL encoded as it receives it and then WO decodes it right.


For a request "recherche?keyword=café&WOURLEncoding=UTF-8", in /tmp/WebObjects.log i get :

Development (Mac OS X - WO 5.3.3) :
Request GET /cgi-bin/WebObjects/MyApp.woa/-50267/wa/recherche? keyword=café&WOURLEncoding=UTF-8
Notice how the value "café" is still encoded café

Development means Direct Connect, not going through Apache?


Deployment (Mac OS X Server - WO 5.3.3) :
Request GET /cgi-bin/WebObjects/MyApp.woa/1/wa/recherche? keyword=cafeÌ&WOURLEncoding=UTF-8
Notice how the value "café" is decoded from café with a certain charset

Are you sure that output is not just an artifact of the logging. I have seen strings get "misinterpreted" by the logging functions before. The value is correct, it is just output incorrectly in the log message.



Chuck


--

Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems.
http://www.global-village.net/products/practical_webobjects






_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Http Adaptor and UTF-8 encoded URL
      • From: Alexis Tual <email@hidden>
References: 
 >Http Adaptor and UTF-8 encoded URL (From: Alexis Tual <email@hidden>)

  • Prev by Date: Re: WOPopUpButton issue
  • Next by Date: Re: Unresponsive hyperlink in WORepetition
  • Previous by thread: Http Adaptor and UTF-8 encoded URL
  • Next by thread: Re: Http Adaptor and UTF-8 encoded URL
  • Index(es):
    • Date
    • Thread