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

Richmond Mathewson richmondmathewson at gmail.com
Fri Jul 10 16:42:44 EDT 2009


Well, I hacked open a Devanagari font and shifted all the non-Unicode
chars to Supplementary Private Use Area-A (Plane 15):

http://www.alanwood.net/unicode/private_use_f0000.html

and felt extremely pleased with myself for being so clever . . .

but pride always comes before a fall . . .

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) . . .    :)
>
>




More information about the use-livecode mailing list