Page 1 of 1
Half character on a Mac
Posted: Wed Nov 18, 2009 3:31 pm
by andyh1234
Any ideas on this one.
I can use numtochar(189) in Windows to get a 1/2 character into the text, but on a mac it displays the pie symbol.
I cannot for the life of me find the char map for a 1/2 symbol on the mac, it just doesnt seem to be there, any ideas?
The fonts in use are Arial on Windows and Lucida Grande on the mac.
Thanks
Andy
Posted: Thu Nov 19, 2009 6:26 am
by ibe
The 1/2 character is 0xC2BD in UTF and 0xBD in unicode on a mac. The quickest way I can think of it to display is to do this:
set the useUnicode to true // local variable so don't worry about resetting it
put NumToChar(0xBD) into tTmp
set the text of field "YourField" to yourString & uniDecode(tTmp)
Can probably be done easier but I'm still getting acquainted with RR.
Shows the 1/2 character on my mac.
Ismo
Posted: Thu Nov 19, 2009 9:37 am
by andyh1234
Thanks Ismo,
That works perfectly in a new empty stack, but still returns the pie symbol in my app so it must be something else somewhere in the stack that is causing the problem, so Im off to find a needle in the haystack!
Thanks for the suggestion, when (or if) I find what is causing the problem Ill report back!
Andy
Posted: Thu Nov 19, 2009 10:05 am
by andyh1234
Got it at last.
I was using ..
put yourString & uniDecode(tTmp) into "YourField"
Works fine if I use (per Ismos post)..
set the text of field "YourField" to yourString & uniDecode(tTmp)
I guess I should use set instead of 'put' more, which is a shame as Ive used 'put' all over the app!
Posted: Thu Nov 19, 2009 1:44 pm
by ibe
Both ways work for me, except that
put yourString & uniDecode(tTmp) into "YourField"
doesn't compile if I don't add the 'field' keyword:
put yourString & uniDecode(tTmp) into field "YourField"
Might want to check if there is something wrong with your put statement.
Ismo