Page 1 of 1

Accented characters not processed correctly

Posted: Tue Feb 15, 2022 11:47 pm
by jonboy49
I'm hoping someone has experienced this before and can point me in the right direction to resolve it.

I'm sending this data to a Zoom API:
{"email":"Lopez18.02.50@partner400.com","first_name":"López","last_name" ....

I can see from the HTTP debug log that the accent is there. When I debug the HTTPAPI routines the data appears to be "intact" up until the point it goes out the door. BUT when processed by Zoom's API the accented character just becomes the unknown question mark thing like so "L�pez".

If I take the exactly same data (literally copy/paste) and run it through Postman the correct accent is retained.

So it appears that the issue is not the Zoom API per se but something is missing in the way I'm using it with HTTPAPI I guess.

Any suggestions on where to look next?

Re: Accented characters not processed correctly

Posted: Wed Feb 16, 2022 4:26 am
by Scott Klement
I'm not familiar with a "Zoom API", but most APIs use UTF-8.

Have you configured HTTPAPI to convert to UTF-8?

Re: Accented characters not processed correctly

Posted: Wed Feb 16, 2022 2:11 pm
by jonboy49
Not sure what you mean by “configured” Scott I don’t recall any specific setting.

Re: Accented characters not processed correctly

Posted: Wed Feb 16, 2022 6:48 pm
by jonboy49
OK - I seem to have found how to do it but would like confirmation.

Adding: http_setOption ( 'network-ccsid' : '1208' );

Seems to be the magic sauce.

I have never needed to do that before. Because everything that I had done previously worked just fine, I had assumed that UTF8 was the default.

Now I know better.

Re: Accented characters not processed correctly

Posted: Thu Feb 17, 2022 3:20 pm
by Scott Klement
It defaults to the value you have compiled into the CONFIG_H member, which ships with 819 (ISO-8859-1).

UTF-8 would've been a better default, but I don't want to change it because it'd break backward compatability.

Re: Accented characters not processed correctly

Posted: Thu Feb 17, 2022 5:59 pm
by jonboy49
OK thanks Scott.

I'll look at changing mine.