About CharToNum and Unicode...

Dar Scott dsc at swcp.com
Sat Jul 24 19:24:09 EDT 2004


On Jul 24, 2004, at 4:37 PM, Andre Garzia wrote:

> Hi Folks imagine this string "made with revolution™" where the last 
> char is that nice trademark symbol made with Option+2. When looping 
> thru the chars of this string and acquiring their unicode values I 
> receive correct values for everyone of them, but for the trademark 
> symbol I am receiving 99 instead of 2112 (which the spec told me is 
> the correct value) (both base16), any clue anyone?

I put just the option 2 into a field and ran this:

on mouseUp
   get the unicodeText of field "field"
   set the useUnicode to true
   get the charToNum of it
   put baseConvert(it,10,16)
end mouseUp

I got 2122.

Dar Scott



More information about the use-livecode mailing list