characters lost pasting from Word To LiveCode field
J. Landman Gay
jacque at hyperactivesw.com
Wed Dec 14 13:02:57 CST 2011
On 12/14/11 12:47 PM, FlexibleLearning wrote:
> This scriptlet looks like a means of ensuring that accented and unicode
> characters in plain text format transfer between platforms to me rather than
> a bridge between text editors.
Yes, you're right. When it went through the list, that was apparently
the problem but I guess in this case it isn't.
> On Dec 13, 2011, at 9:02 PM, J. Landman Gay wrote:
>> On 12/13/11 5:09 PM, Sieg Lindstrom wrote:
>>> I'll say up front the details of text encoding are not my strong suit.
>>> earlier versions (RunRev 4.x and earlier), I'd sometimes have to write
>>> special routines to search and replace certain characters from the pasted
>>> text. For example, the em-dash, "?" (chartonum 209), which after pasting
>>> from Word was seen by RunRev as two characters (a two-byte character?),
>>> numtochar of 32 followed by numtochar of 20 so I wrote a routine to just
>>> search and replace to numToChar of 209. My new problem is that with
>>> 5.0x (I just upgraded to 5.02), the em-dash if pasted from a Word file
>>> instantly disappears from the text.
>> Someone once posted a function to the list that translates Word text to
> useable LiveCode text. I saved it but haven't ever tried it. I wish I'd also
> recorded who wrote it:
>> function revText theText
>> return unidecode(uniencode(theText,"utf8"))
>> end revText
>> Use that on the clipboard contents and see if it does what you need.
> No workie Jacque. From word I get empty. From Textedit I get ??? If I put
> just the clipboardData from Word I get nothing. If I put the clipboardData
> from Textedit I get an emDash. Bottom line: Microsoft does not play well
> with Livecode's clipboard. Other apps are fine.
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
Jacqueline Landman Gay | jacque at hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
More information about the use-livecode