I am using
Lua 5.3
IUP 3.26

I am trying to get the HTML text from the clipboard using

require "iuplua"

local clipboard = iup:clipboard()
local script
clipboard.format = 'text/html'

if clipboard.formatavailable == 'YES' then
   script = clipboard.formatdata
   print(clipboard.FORMATDATASIZE)
   print(#script,script)
end

When I run the above the formatdata size returns 64, but my script string
terminates at the first null what appears to be a UTF-16 HTML string.

How do I get the whole contents back from the clipboard please,  I have a
function to convert UTF-16 to UTF-8 if I can get the whole string back to a
variable.

-- 
Jane.

Jane Taubman | www.rjt.org.uk | www.taubman.org.uk | www.fhug.org.uk
_______________________________________________
Iup-users mailing list
Iup-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/iup-users

Reply via email to