LiveCode Fields - Mac Roman ANSI Characters and Unicode

paolo mazza mazzapaoloitaly at
Fri Nov 27 03:55:17 EST 2015

Hi Brahmanathaswami,
I installed LC server 7.0.4 in a Linux machine.
I have a similar problem with the chartonum function of special chars
(ie àèùì .. ).
As an example:
function chartonum("à") return 195 istead of 136
function chartonum("è") return 195 istead of 143
I do not know why.
Paolo Mazza

On Sat, Sep 19, 2015 at 10:00 PM, Brahmanathaswami <brahma at> wrote:
> bottom line question:
> Is LC automatically transforming all the 128-255 ANSI chars to their unicode
> equivalents?  as per this chart:
> ??
> Back story:
> For years I have struggled with getting MacRoman ANSI characters like Curly
> quote(s) and MDashes which are called on the Mac Keyboard with e.g.
> shift-option-dash... In the old days this would produce.. if you ran a
> charToNum function on it you would get 209 for mdash...
> Once again, circa 2015 I am faced with text that contains both unicode
> compliant UTF-8 strings AND  macRoman ANSI in the same paragraph...
> But...if I import that text into an LC field using "set the html text" to
> that same chunk which include the ANSI character... I am seeing the mdash
> properly displayed and the curly quotes and apostrophe's
> Now, and this is the interesting part:  in LC7.1 RC3 if copy that from LC,
> open a browser, go to PHPMyAdmin and paste into a column/field  I am getting
> what appears to me fully unicode compliant text!
> Since the screen is rendering the characters as expected.. I can't really
> tell though.. I don't know how to analyze the string to see if it is 100%
> unicode... but my "gut" is telling me that perhaps  LC is auto transforming
> the old 209 to the new unicode —  for that character "on it's own," so
> to speak.
> If so, this is "huge" for me... good news... but we are still having
> problems with "POST" to get that same text into the database...
> I've tried the clipboardData["unicode"]
> But I think Jacque clued me in and the way to go is to do
> textEncode (the clipboardData["text"], "UTF-8") into tDataToPost
> and *then* post it to the API that will insert it into mySQL
> Also... if any one has any advice on how to handle the post on the LC server
> side to preserve the UTF-8 string for insertion (RevIgniter Active database
> library) that will also help.
> But the POST is a separate issue... I first want to understand what LC is
> doing in these fields with the "old" ANSI chars on the Mac?
> Swasti Astu, Be Well!
> Brahmanathaswami
> Kauai's Hindu Monastery
> _______________________________________________
> use-livecode mailing list
> use-livecode at
> Please visit this url to subscribe, unsubscribe and manage your subscription
> preferences:

More information about the use-livecode mailing list