Referring to chars by decimal or hex numbers ????

Richmond Mathewson richmondmathewson at gmail.com
Sun Jul 12 12:27:08 EDT 2009


Thank you very much; just got back from a weekend in the
country cottage (pruning the vines and so on) - so will
look at these web refs immediately.

Peter W A Wood wrote:
> Richmond
>
>> Supplementary Private Use Area-A  [not that funny place in the USA
>> where aliens have been landing] starts at Unicode hex U+F0000
>>
>> [funny how that says 'UFO' in code. But I digress . . .]
>>
>> (that's 983040 in decimal numbers)
>>
>> so merrily tried
>> set the useUnicode to true
>> put numToChar(983040) into fld "SUCCESS"
>>
>> and fell foul of this:
>>
>> "If the useUnicode property is set to true, the ASCIIValue is an 
>> integer between zero and 65535."
>>
>> BLAST!
>>
>> Oops:  983040 is bigger than 65535
>> (had to slip in that note for people who have a problem counting up 
>> to 7) . . .    :)
>
> Your blast may be premature. Devan Asay's Unicode tutorial 
> (http://www.runrev.com/developers/tutorials/unicode-in-revolution/) 
> says that all Unicode characters are UTF-16. In UTF-16 numbers greater 
> than 65535 can be represented by a two character combination. It's all 
> explained much better than I could at http://en.wikipedia.org/wiki/Utf-16
>
> The UTF-16 sequence for the Unicode code point 983040 (decimal) is 
> DB80 DC00 (Hexadecimal) ; courtesy of 
> http://rishida.net/tools/conversion/
>
> Regards
>
> Peter
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your 
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>




More information about the use-livecode mailing list