[Glass] REST service and accented strings

Richard Sargent via Glass glass at lists.gemtalksystems.com
Thu Aug 6 15:18:04 PDT 2015


I think the encoding is the problem.

ISO/IEC 8859-1:1998, Information technology — 8-bit single-byte coded
graphic character sets — Part 1: Latin alphabet No. 1

But you are receiving what appears to be UTF-8. I'm no expert in this area,
but I suspect that if you tell it the encoding is UTF-8, the web server
will decode it for you. 8859-1 basically says (I think) to leave every
8-bit byte alone.


On Thu, Aug 6, 2015 at 3:10 PM, Dale Henrichs via Glass <
glass at lists.gemtalksystems.com> wrote:

> Bruno ... just taking a look and I haven't wrapped my head around your
> problem yet ... but it does jump out that you are using ISO-8859-1 encoding
> ...
>
> I'm not complemently familiar with javascript conventions, but I think
> that the default encoding for javascript is UTF8 ... it's also possible
> that the encoding is done somewhere else (as part of transport mechanism
> when the REST is put on the wire), so perhaps no special encoding needs to
> be applied ...
>
> Dale
>
>
> On 08/06/2015 02:47 PM, BrunoBB via Glass wrote:
>
>> Hi All,
>>
>> I have some problems to handle accented string with Seasde REST.
>> The service is defined as follow:
>> testPut
>>         "This service is called by Orbeon when a user click on -Save-
>> inside the
>> Form Builder.
>>         A Form Definitions has been saved "
>>         | orbeonData |
>>         <put>
>>         <path: '/testPut'>
>>
>>         orbeonData := Orbeon_Form_Data new.
>>
>>         orbeonData xml: (self requestContext request rawBody
>> "bodyDecodeUsing:
>> 'ISO-8859-1'");
>>                 document_id: '1';
>>                 addToCache.
>>
>> Using Postman from google is i do a "put" to the service with xml value:
>> <label>ó</label>. (accented o)
>>
>> If i check Orbeon_Form_Data object at "xml" instance variable it answer:
>> <label>ó</label>.
>>
>> Does anyone has any idea what is happening ?
>>
>> Now investigating this...
>>
>> Regards,
>> Bruno
>>
>>
>>
>> --
>> View this message in context:
>> http://forum.world.st/REST-service-and-accented-strings-tp4841375.html
>> Sent from the GLASS mailing list archive at Nabble.com.
>> _______________________________________________
>> Glass mailing list
>> Glass at lists.gemtalksystems.com
>> http://lists.gemtalksystems.com/mailman/listinfo/glass
>>
>
> _______________________________________________
> Glass mailing list
> Glass at lists.gemtalksystems.com
> http://lists.gemtalksystems.com/mailman/listinfo/glass
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gemtalksystems.com/mailman/private/glass/attachments/20150806/917f999b/attachment.html>


More information about the Glass mailing list