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 » Tue Jul 29, 2014 6:59 am

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] » Tue Jul 29, 2014 10:13 pm

..........
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 » Wed Jul 30, 2014 6:45 am

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] » Wed Jul 30, 2014 9:47 am

..........
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 » Wed Jul 30, 2014 4:54 pm

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] » Wed Jul 30, 2014 7:52 pm

..........
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 » Thu Jul 31, 2014 1:16 pm

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

Post Reply