hi,

> I have a function to convert UTF-16 to UTF-8 if I can get the whole
string back to a variable.

  "data" can not be converted to a string using "tostring". It must use
this function you mentioned. Assuming that  'text/html' is returned as
UTF-16. What's the UTF-16 representation in Lua for that function?

Best,
Scuri

Em qua., 29 de abr. de 2020 às 11:59, Jane Taubman <janetaub...@gmail.com>
escreveu:

>
>
> On Tue, 25 Jun 2019 at 15:18, Antonio Scuri <antonio.sc...@gmail.com>
> wrote:
>
>>  It will be returned as a light user data. Then you can use your
>> conversion functions.
>>
>
>
> I have finally returned to this one and now need to process the
> lightuserdata in Lua,   I tried to use the tostring() option to get the
> string out of the returned lightuserdata, but I don't think the  __tostring
> metamethod has been defined.   Is there any other way I can get the string
> out of the lightuserdata,  remember I don't have access to the main
> application so need to do any manipulation in Lua.
>
> Thanks
>
> My current code is
>
> clipboard = iup:clipboard()
>
> clipboard.format = 'text/html'
> data = clipboard.formatdata
> print(clipboard.formatavailable,clipboard.FORMATDATASIZE)
>
> print(tostring(data))
>
>
>
>
>
> _______________________________________________
> Iup-users mailing list
> Iup-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/iup-users
>
_______________________________________________
Iup-users mailing list
Iup-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/iup-users

Reply via email to