en- & em-dash paste from Word (followup)

Sieg Lindstrom sl at trackandfieldnews.com
Sat Mar 3 22:56:01 EST 2012


I brought this up in December and got a suggestion I thought would work. Alas, it didn't. I have a parsing tool running on OSX in which I paste text from Word (Mac Office, was using 2004 in December, using 2011 now) into a field.

When I paste en and em dashes (charToNums 208 and 209) disappear. It's true that pasting from Word to TextEdit and then into the LiveCode field solves the problem and these characters don't disappear. But that's a real pain if you have to do it dozens of times a day.

The suggested solution was basically...

put the clipboardData into tText

... then find the en and em dashes and replace as needed in tText and put tText into the relevant field.

Turns out that LiveCode still doesn't see the characters. If I paste a single en- or em-dash, LiveCode sees the clipboardData as being type "text" but its length is 0 and charToNum of the character returns nothing.

Inquiring again in case anybody knows more about clipboardData that might suggest a solution. I tried workarounds that turned these characters into plain-vanilla hyphens but the three dash types key too many actions by the parser and I wound up down an ever-more complicated trail of unintended consequences in multiple handlers, and misparsed data.

This copy and paste worked fine in RunRev. Thank you.

Sieg Lindstrom






More information about the use-livecode mailing list