unicode & umlauts

Eric A. Engle engleerica at yahoo.com
Thu Jun 21 11:42:20 EDT 2018

Yes, I think my problem with Chinese was I had only simplified and not traditional fonts installed. Anyway I installed some libraries now my paste clipboard ctrl v works.

What doesn't work is calling the Yandex api to translate and then send the translation to a livecode field. Even though I definitely have all the fonts for Chinese and German installed Yandex returns a bunch of question marks to the field. :/  
Why is that? What must be done? Because yandex clearly send HTML readable characters since the apis work on the web. What must I do to the text returned? 

on mouseup
  repeat with i = 1 to the number of lines in card field "source"
      put URLEncode(line i of cd fld "source") into theText
      put "https://translate.yandex.net/api/v1.5/tr.json/translate?key=trnsl.1.1.20180527T091305Z.7f33f9fb3f66f0bb.d573f1d9a6336a981504916600c45f49255938b3&text="&theText&"&lang=de-en" into tResult
      put URL tResult into tResult
      set the itemdelimiter to "["
      put the last item of tResult into targetText
      put targetText & return after cd fld "target"
  end repeat
end mouseup

This script works For German except it munges up umlauts. It also works for zh-en but then just returns a bunch of question marks. I definitely have all fonts installed. I have tried this in windows 10 and linux mint in case it is still a linux issue.

How am I to process this text from the yandex api to get unicode chinese characters? 

Another question: in hypercard cmd + . = stop executing script. Is there any similar command in livecode?

More information about the Use-livecode mailing list