characters lost pasting from Word To LiveCode field

Sieg Lindstrom sl at trackandfieldnews.com
Tue Dec 13 17:09:21 CST 2011


I use a LiveCode app (OSX) to parse text taken from Word files, glean
relevant data, write records to a database and also reformat the original
text in certain ways. I copy and paste text from Word into a field in my
app, click a button and it does the rest, until I upgraded to 5.0x.

I'll say up front the details of text encoding are not my strong suit. With
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 LiveCode
5.0x (I just upgraded to 5.02), the em-dash if pasted from a Word file
instantly disappears from the text.

This...

Berlin, Germany, December 12‹

becomes this...

Berlin, Germany, December 12

This probably affects other characters; I'm not yet sure which ones. Any
suggestions how I can seamlessly copy and paste the em-dash and other
characters like it from Word to a LiveCode field? The only workaround, very
inelegant, that I've found is to copy and paste from Word to TextEdit and
then from TextEdit to LiveCode app. Not a welcome extra step. Thanks in
advance.

Sieg





More information about the use-livecode mailing list