Hello Thomas,

the URI Builder seems to %encode characters according to the Latin1
character set, whereas Firefow encodes according to UTF-8, which fit the
way the query is read by default on server side. There is a mismatch there.
You can still, on server side, specify the character set used to %decode
the query:
Form form =
request.getResourceRef().getQueryAsForm(CharacterSet.ISO_8859_1);

On client side, from what I see, you can still provide your own
implementation of the UriBuilder that %encode the characters as you desire.
1/ inherit from org.restlet.ext.jaxrs.AbstractUriBuilder and override a
couple of methods
2/ inherit from org.restlet.ext.jaxrs.internal.spi.RuntimeDelegateImpl()
and override the "createUriBuilder" method in order to return your
implementation of UriBuilder.
3/ set your runtime instance by invoking the following static call :
javax.ws.rs.ext.RuntimeDelegate.setInstance(your-runtimeDelegate-instance);


I've entered an issue for that :
http://restlet.tigris.org/issues/show_bug.cgi?id=1373

Best regards,
Thierry Boileau


>From what I understood this method is supposed to add a new segment and not
> replace the {somevar}.
>
> --
> View this message in context:
> http://restlet-discuss.1400322.n2.nabble.com/UriBuilder-encoding-tp7230131p7246398.html
> Sent from the Restlet Discuss mailing list archive at Nabble.com.
>
> ------------------------------------------------------
>
> http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2917417
>

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2921215

Reply via email to