Unicode and the Android Euro Symbol

The place to discuss anything and everything about running your LiveCode on Android

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
srbarlow3
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 37
Joined: Fri Sep 28, 2012 5:20 pm

Unicode and the Android Euro Symbol

Post by srbarlow3 » Mon Mar 03, 2014 6:23 pm

I have been puzzling for several days trying to read all the old posts to figure out how to generate the Euro symbol in a text field on Android. I have read several solutions but none have worked for me, probably due to my ignorance.

Here's what I want to do.

In my app I want to be able to allow users to format money into several currencies( dollar, euro,pound and yen). The android has no ascii character for the Euro symbol. In its place they have some funny character I am not familiar with. I did find a unicode character decimal 8364 that is the Euro on Android.

if I :

set the unicode to true
set the unicode of field "myField" to numToChar(8364)

it puts a euro symbol into field "myField"


But my app uses a button that toggles through the currency symbols, sets the button label to the symbol, and then puts the symbol into a field that shows a formatting example.

I have been able to set the button label with the following:

set the unicodeLabel of button "myButton" to numToChar(8364)

The ultimate output of my utility is a text file I build where I need to intersperse whatever currency symbol that has been selected into the text whenever a monetary value is occurs.

This all works great on the mac since there are ascii characters for all four currencies. On the Android there are only the three without the euro.

I have also tried installing a font into my app that has a euro symbol and then using that font for the fields in question but that didn't seem to work either?

How can I combine the ascii text and unicode text containing the euro symbol so that they can be put into a text file to be emailed by by app?

I don't want to abuse any future inclination to help by coming to this board for every small problem but I have been working on this for days. It is the one unfinished issue in the Android version of my app.

I think I need to create the whole text file as unicode and concatenate the pieces together but I'm not sure how.

Thanks

Russ

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am

Re: Unicode and the Android Euro Symbol

Post by Simon » Wed Mar 05, 2014 5:01 am

Hi Russ,
On my Android device

Code: Select all

on mouseUp
   set the useUnicode to true
   set the unicodeText of field "myField" to numToChar(8364)
  set the unicodeLabel of button "myButton" to numToChar(8364)
end mouseUp
Does work.

Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

srbarlow3
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 37
Joined: Fri Sep 28, 2012 5:20 pm

Re: Unicode and the Android Euro Symbol

Post by srbarlow3 » Fri Mar 07, 2014 11:40 pm

Simon

I got there too, but I couldn't get the character into an email from the android device. The end up as question marks in the email...I didn't see a way to send unicode formatted email from the android email program.

Thanks

Russ

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am

Re: Unicode and the Android Euro Symbol

Post by Simon » Tue Mar 25, 2014 2:12 am

Hi Russ,
Did you file this as a bug?
http://quality.runrev.com/

Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

Post Reply