You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by pallavig <pg...@gmail.com> on 2015/04/02 08:21:27 UTC

Non ascii characters in URL param in camel

I am using graph API of Facebook and I call it through camel framework. My
query has non ASCII characters (e.g. küçük). I am getting the following
exception:-

Cause: 
org.apache.commons.httpclient.URIException: Invalid query
at org.apache.commons.httpclient.URI.parseUriReference(URI.java:2049)
at org.apache.commons.httpclient.URI.<init>(URI.java:147)
at org.apache.commons.httpclient.HttpMethodBase.getURI
at org.apache.commons.httpclient.HttpClient.executeMethod
at org.apache.commons.httpclient.HttpClient.executeMethod
at org.apache.camel.component.http.HttpProducer.executeMethod
at org.apache.camel.component.http.HttpProducer.process
at
org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)
at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
at
org.apache.camel.processor.SendProcessor$2.doInAsyncProducer(SendProcessor.java:122)

Does camel support non ASCII characters in URI? If not, what other things
can be done?

example URL: https://graph.facebook.com/?ids=http://www.example.com/küçük





--
View this message in context: http://camel.465427.n5.nabble.com/Non-ascii-characters-in-URL-param-in-camel-tp5765190.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Non ascii characters in URL param in camel

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

You can url escape those non ascii values to %NN.

w3cschools has an online
http://www.w3schools.com/tags/ref_urlencode.asp

On Thu, Apr 2, 2015 at 8:21 AM, pallavig <pg...@gmail.com> wrote:
> I am using graph API of Facebook and I call it through camel framework. My
> query has non ASCII characters (e.g. küçük). I am getting the following
> exception:-
>
> Cause:
> org.apache.commons.httpclient.URIException: Invalid query
> at org.apache.commons.httpclient.URI.parseUriReference(URI.java:2049)
> at org.apache.commons.httpclient.URI.<init>(URI.java:147)
> at org.apache.commons.httpclient.HttpMethodBase.getURI
> at org.apache.commons.httpclient.HttpClient.executeMethod
> at org.apache.commons.httpclient.HttpClient.executeMethod
> at org.apache.camel.component.http.HttpProducer.executeMethod
> at org.apache.camel.component.http.HttpProducer.process
> at
> org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)
> at
> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
> at
> org.apache.camel.processor.SendProcessor$2.doInAsyncProducer(SendProcessor.java:122)
>
> Does camel support non ASCII characters in URI? If not, what other things
> can be done?
>
> example URL: https://graph.facebook.com/?ids=http://www.example.com/küçük
>
>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Non-ascii-characters-in-URL-param-in-camel-tp5765190.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/