Unicode text as the "selected" property of revBrowser

Interested adding compiled externals from LiveCode and third parties to your LiveCode projects? This is the place to talk about them.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
sp27
Posts: 135
Joined: Mon May 09, 2011 3:01 pm

Unicode text as the "selected" property of revBrowser

Post by sp27 » Fri May 27, 2011 8:11 am

My instance of revBrowser has English and Russian (Unicode) text. The meta tag in the page sets the charset to UTF8. The text in both languages is displayed fine.

In the same card I have a field called "BrowserSelection" and a button with this script:

Code: Select all

on mouseUp
  get revBrowserGet(gBrowserID, "selected")
  put uniEncode(it, "UTF8") into locSelectedText
  set the unicodeText of field "BrowserSelection" of this card to locSelectedText
end mouseUp
So long as the selection in the revBrowser windows is English, this works fine. But when I select Russian text, only question marks show up in field BrowserSelection.

What am I doing wrong?

Thanks,

sp27

Post Reply