login about faq

I am trying to get some values back from the Twitter Api. But for some reason I cant receive the correct arabic letters (english works perfectly). I always get e.g.: "u0623u0628u0648 u0646".

I pretty sure need to set the charset or something, but I am really stuck and dont know where to look :-/

I did try to set:

http.put_Utf8(true); vals = http.quickGetStr(getstring);

const char* vals would hold something like "حموي" but receives "u0....."

asked Mar 25 '16 at 15:44

RootTag's gravatar image


I know pushing threads is not good, but... I fear I need your help here :-/


answered Apr 25 '16 at 14:12

RootTag's gravatar image


Looks like JSON strings can encode unicode characters as uXXXX, so I suspect you will need to parse these return values. See https://tools.ietf.org/html/rfc7159#section-8.1

Not sure if Chilkat has any methods to do this, but maybe your language does? For example, PHP has a json_decode function that appears to do the necessary decoding.


answered Apr 25 '16 at 20:44

jpbro's gravatar image

jpbro ♦

Hi jpbro, thank you for the reply. My program is written in c++. Looks like I'll have to do the parsing work on my own :-/ Did not find anything related to this json-return values via chilkat.

But maybe we can be lucky and Chilkat might provide a json-parsing class in the future? Have seen this kind of requests in the forums ;-)


answered Apr 26 '16 at 08:15

RootTag's gravatar image


I agree that it would be a nice feature to have in Chilkat - would probably make sense to be a part of the new Chilkat JSON classes, or possibly Chilkat Charset class - support for "json" as a charset. Unless passing the Json string to the ChilkatCharset class with a value of "utf-8" for the FromCharset parameter works? Might be worth a try.

(Apr 26 '16 at 09:06) jpbro ♦

The http.quickGetStr is just returning the HTTP response body,which could be HTML, XML, JSON, plain-text, or anything else. It can't, nor shouldn't, try to interpret and change the text that is returned.

If the response is JSON, then you can load it into a JsonObject (or CkJsonObject, depending on your programming language), and it should automatically parse the unicode encoding (uXXXX)


answered Apr 26 '16 at 12:16

chilkat's gravatar image

chilkat ♦♦

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: Mar 25 '16 at 15:44

Seen: 1,100 times

Last updated: Apr 26 '16 at 12:16

powered by OSQA