2

I've had to brute force unicode answer dialogues in iOS with LiveCode. It's not a very elegant solution. Has anyone been able to make UTF8-encoded answer dialogues work on iOS? It's more than a year ago, but this forum post claims they could.Forum Post

They basically say that if you convert the UTF16 to UTF8, the answer dialogue will accept that encoding. I created a new plain text file with a line of Japanese, saved it with UTF8 encoding, and then pulled it in with url ("file:translation.text"). I confirmed that it was pulling in the right text file. I used the following code to put the UTF8-encoded text into the answer dialogue:
put uniDecode(uniEncode(tMsg,"UTF8")) into tMsg
answer tMsg

2 Answers2

1

Unfortunately not and the htmlText workaround people have been using on the desktop doesn't work either. The workaround is to create a group and show/hide it. Use a full screen size black opaque graphic behind it with blendLevel set to about 80%.

Monte Goulding
  • 2,380
  • 1
  • 21
  • 25
-1

You can use unicodeText in answer dialogs.

Steps:

  1. read in the text from your UTF8-encoded file - ensure you use "binfile:" to read it in, if using the URL technique.

  2. convert your text to livecode-friendly text using

    unidecode(uniencode(pText,"UTF8"))

In my system, I store my unicode strings in an array after this step, for easy selection later.

  1. Answer

Admittedly I'm using this for various european languages and not japanese in this case... I do remember struggling with this whole area also. Good luck!

  • This works for languages with 256 different symbols only. This will most definitely not work for Japanese, Chinese, Korean, Arabic, Thai and quite a few other languages. – Mark Oct 04 '13 at 18:56