Nice.

On 2020-05-08 at 6:42 AM, Antonio Scuri <antonio.sc...@gmail.com> wrote:
  Ok. 


  I had an idea. Just added a new attribute for IupClipboard:


FORMATDATASTRING [Windows and GTK Only]: sets/gets FORMATDATA and
FORMATDATASIZE considering data being a string in the system format. (since
3.29)



Best,
Scuri




Em qui, 7 de mai de 2020 06:32, Jane Taubman <janetaub...@gmail.com> escreveu:

I get the plain text,  excluding the html code.    When you copy from a web
browser like Chrome you get several different formats.
So if I copy your post from gmail the TEXT is
-------------------------------------------------

What happen if you simply try using:



  script = clipboard.text
instead of
   script = clipboard.formatdata



  Leaving the rest as it is. 

-----------------------------------------------------

but the text/html is 



<div>What happen if you simply try using:<br></div><div><br></div><div> 
script = clipboard.text</div><div>instead of</div><div>   script =
clipboard.formatdata<br></div><div><br></div><div>  Leaving the rest as it is.
</div>


On Mon, 4 May 2020 at 23:13, Antonio Scuri <antonio.sc...@gmail.com> wrote:

  What happen if you simply try using:



  script = clipboard.text
instead of
   script = clipboard.formatdata



  Leaving the rest as it is. 



Best,
Scuri




Em seg., 4 de mai. de 2020 às 13:41, Jane Taubman <janetaub...@gmail.com>
escreveu:

I'll try to explain in a clearer way.


If I open a file saved in UTF-16 in Lua using the IO library.   I can then
handle the content of that file to convert each pair of bytes as needed to end
up with UTF-8 or even Ascii.  All I want to do is to be able to read in the
text/html format from the clipboard and process it in lua.



However I can not do anything with the Light user Data returned from the
Clipboard using Lua,  that I can discover.






On Sun, 3 May 2020 at 21:56, Andrew Robinson <arobinso...@cox.net> wrote:

I hate to state the obvious but in a string data type, an ASCII "character" is
one byte in size (char), and a UTF-16 "character" is two bytes in size
(short).


I apologize if this is out-of-place for your conversation, but I get a lot of
people who confuse a string character with a byte, instead of a variable
number of bytes, but ... you know, just in case that is the real issue here I
wanted to "fix it".


So I'm not sure whether to say de nada or lo siento,
Andrew


On 2020-05-03 at 12:02 PM, Antonio Scuri <antonio.sc...@gmail.com> wrote:
>  The UTF-16 function takes a "string"  


  That is weird. UTF-16 strings are unsigned short* arrays, strings in Lua are
char* arrays. Something is not right. 



  Is there a link for the documentation of that library?


Best,

Scuri




Em dom., 3 de mai. de 2020 às 09:02, Jane Taubman <janetaub...@gmail.com>
escreveu:

>    "data" can not be converted to a string using "tostring". It must use
this function you mentioned. 



Sorry I did not make myself clear.    The UTF-16 function takes a "string" and
will not work with a "light user data" so I need to know how to convert the
light user data from the iup.clipboard to a string using just lua.



-- 

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



_______________________________________________
Iup-users mailing list
Iup-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/iup-users



-- 

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

_______________________________________________
Iup-users mailing list
Iup-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/iup-users



-- 

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
_______________________________________________
Iup-users mailing list
Iup-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/iup-users

Reply via email to