MacToISO is still confusing me

Graham Samuel livfoss at mac.com
Sun Dec 22 15:44:38 EST 2013


Yes, but can you **see** the string (in a field, presumably) cross-platform without mucking about with fonts? And if so, which of the now rich collection of platforms?

Search me.

Graham

On 22 Dec 2013, at 21:40, Richmond wrote:

> On 22/12/13 22:13, Fraser Gordon wrote:
>> On 21/12/2013 22:48, Graham Samuel wrote:
>>>  put MacToISO(numToChar(185))
>>> 
>>> you don't get a pi symbol. This is not a good start.
>>> 
>> Hi Graham,
>> 
>> I know this isn't much use to you at the moment, but we're hard at work
>> adding "proper" Unicode support to the LiveCode engine. One of the
>> functions that has been implemented in doing this is numToUnicodeChar
>> which takes a Unicode codepoint value and turns it into a string, e.g.:
>> 
>> put "The value of" && numToUnicodeChar(0x3C0) && "is approximately 3.14"
>> into tVar
>> 
>> Alternatively, you could just paste the pi character into the string
>> literal itself as scripts and the script editor will support direct
>> entry of Unicode text. With this support, dealing with Unicode strings
>> is no different from working with strings using the native 8-bit
>> encodings like MacRoman and ISO-8859-1.
>> 
>> Regards,
>> Fraser
>> 
>> 
>> 
> 
> I just did this:
> 
> on mouseUp
>   set the useUnicode to true
> put numToChar(42001) into CH42001
>   set the unicodeText of fld "OOT" to CH42001
> end mouseUp
> 
> and everything worked perfectly alright,
> 
> I am aware that that is just a fancy way of doing this:
> 
> on mouseUp
>   set the useUnicode to true
> set the unicodeText of fld "OOT" to numToChar(42001)
> end mouseUp
> 
> but
> 
> set the useUnicode to true
> put numToChar(42001) into CH42001
> 
> converts a Unicode codepoint into a string without there being a need for anything new at all.
> 
> Of course one can build up a long string (i.e. longer than a single Unicode char) in an extremely obvious
> way:
> 
> set the useUnicode to true
> put numToChar(471) & numToChar(567) & numToChar(9925) into UNICODEstring
> 
> Richmond.
> 
> _______________________________________________
> 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