Unicode Issue

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
WaltBrown
Posts: 466
Joined: Mon May 11, 2009 9:12 pm

Unicode Issue

Post by WaltBrown »

I have been trying to put a Unicode character into a field. The character in this case is the Smiley Face, 9066, 0x236A. I have set the field to Arial because that character is in the font file on the system. I have tried all kinds of permutations of useUnicode, uniDecode, uniEncode, the unicodeText of, binaryEncode, put unicode text, "Unicode" as the language selector, etc, etc. and I can't get the smiley face to appear in the field.

Thanks,
Walt
Walt Brown
Omnis traductor traditor
[-hh]
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2262
Joined: Thu Feb 28, 2013 11:52 pm

Re: Unicode Issue

Post by [-hh] »

..........
Last edited by [-hh] on Wed Aug 13, 2014 3:57 pm, edited 1 time in total.
shiftLock happens
WaltBrown
Posts: 466
Joined: Mon May 11, 2009 9:12 pm

Re: Unicode Issue

Post by WaltBrown »

Thanks. What I was trying to make was a font explorer to look at all available Unicode code pages, so I guess that's a no-go for the time being.
Walt Brown
Omnis traductor traditor
[-hh]
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2262
Joined: Thu Feb 28, 2013 11:52 pm

Re: Unicode Issue

Post by [-hh] »

..........
Last edited by [-hh] on Wed Aug 13, 2014 3:57 pm, edited 1 time in total.
shiftLock happens
Peter Wood
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 92
Joined: Mon Jul 06, 2009 4:53 am

Re: Unicode Issue

Post by Peter Wood »

You can do this is LiveCode < 7:

[code]
on mouseUp
set the useUnicode to true
set the unicodeText of Field "Smiley" to numToChar(55357) & numToChar(56836)
end mouseUp
[/code]

It doesn't display a smiley as it seems non of the fonts supplied with LiveCode include the colour emoticons. (I know the field contains the correct character, when I paste the field contents into a Cocoa App the smiley is displayed>)
[-hh]
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2262
Joined: Thu Feb 28, 2013 11:52 pm

Re: Unicode Issue

Post by [-hh] »

..........
Last edited by [-hh] on Wed Aug 13, 2014 3:57 pm, edited 1 time in total.
shiftLock happens
WaltBrown
Posts: 466
Joined: Mon May 11, 2009 9:12 pm

Re: Unicode Issue

Post by WaltBrown »

Thanks Hermann, great info!
Walt
Walt Brown
Omnis traductor traditor
Post Reply