OT-ish warning: Apple is still using Mac Roman

Bob Sneidar bobsneidar at iotecdigital.com
Sun Feb 2 15:17:09 EST 2014


I recently was working on getting fields to accept unformatted text in a drag drop scenario. What I did was intercepted the drop, and then put the dropData [“text”] into the field. Something along these lines may be what you are looking for. 

As an aside, I was importing clipboard data from an Excel Spreadsheet copy, and interspersed in the actual data were non-printing codes. When I checked their ASCII values they were WAY outside the range of letters, numbers and special characters. Upon further research, they turned out to be old characters that use to be used in DOS applications for drawing boxes around a bit of text. I was getting the one for the bottom border character for a vertical line for a double line box. 

So the moral to the story is, just because you get the clipboardData [“text”] does not mean it’s what you expect! :-)

Bob


On Jan 29, 2014, at 13:40 , Graham Samuel <livfoss at mac.com> wrote:

> I'm using LC 6.5.1 on a Mac with Mavericks. Recently I was given a Pages document with some text I needed to paste into a LiveCode desktop app. The relevant text was:
> 
> 3*(-1*x^2 + 4)(-1*x^4 - 5x + 2)
> 
> (Don't worry, it's just a meaningless example).
> 
> I changed this to plain text (it had originally been coloured and I thought this might affect the result). I then used an LC script to search for some characters, particularly the minus signs. Couldn't find them. Then I realised that I had to put the text string through LC's MactoISO function - so Pages, far from using UniCode (I thought everybody was doing it) is still using the old Mac character set. LC, even on a Mac, apparently isn't. The thing is, the pasted text **looks** OK in an LC field, but it's not.
> 
> Just a gotcha that surprised me and may bite someone else.
> 
> I'm wondering if LC 7 will take this kind of problem away. I'm also wondering what Apple are up to still using a proprietary character code. And I'm wondering if I should have tried to do the whole thing with Unicode text.
> 
> Graham
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode





More information about the use-livecode mailing list