Getting text in Hebrew in JSON, does not show up in hebrew

444 views
Skip to first unread message

Bernard Haddad

unread,
Mar 16, 2018, 1:25:26 PM3/16/18
to MIT App Inventor Forum
Hello,
I am building an app that search some text in a web site and this site sends back a JSON text.
that works quite well.
However this text contains englsih as well as hebrew text but it shows a series of \u05e8\u05d0  etc.
from this sit (https://www.fileformat.info/info/unicode/char/05e8/index.htm) this is a Java file format for hebrew language.
How can I take this part of the text and display it correctly in hebrew.
I have already played with displaying hebrex with app inventor and that works fine.
Any idea?
thanks 

Evan Patton

unread,
Mar 16, 2018, 4:29:07 PM3/16/18
to MIT App Inventor Forum
Hi Bernard,

How are you processing the JSON when you receive it in the app? The Web.JsonTextDecode function should correctly handle the Unicode escape sequences. If not, can you give us example JSON document to test with?

Thanks,
Evan

Bernard Haddad

unread,
Mar 18, 2018, 11:13:59 AM3/18/18
to MIT App Inventor Forum
Hi,
apparently I did not go to the last point.
I had prepared this Jsontextdecode method but did not use it.
with it now I get the hebrew text.
However things are not very easy to understand, is there a place where this is explained in more detail either Appinventor with Json or purely Json.
For example, is it better to split the content before decoding it or after? and more..
here is a file with both the raw content and the result after JSONTextDecode function
thanks
Sefaria_content.txt

Ghica

unread,
Mar 19, 2018, 3:57:20 PM3/19/18
to MIT App Inventor Forum
Hi,
It seems to me that you should decode the JSON first and then decompose the content. If you would split the JSON string into parts first, you would get malformed JSON, that you may not be able to decode.
Look here for information about JSON: https://www.json.org/
Cheers, Ghica.

Bernard Haddad

unread,
Mar 19, 2018, 4:10:30 PM3/19/18
to MIT App Inventor Forum
Thanks Ghica.
Yes, that is what I did eventually, stumbling on another problem that I finally solved (another case I opened also) even though I don't exactly understand the details. The ":" separator was not a correct character recognised in the split function.
Best regards,
Bernard Haddad
Reply all
Reply to author
Forward
0 new messages