PRINTER: how to convert accented characters in ASCII code?
Moderators: adafruit_support_bill, adafruit

PRINTER: how to convert accented characters in ASCII code?

by toto007 on Tue Nov 27, 2012 4:21 am

Hello,
are just starting out with arduino. I have bought this product http://adafruit.com/products/597.
I have a array of char that are letters with accents. How can I replace single accented characters with ASCII code and print the message correctly?
i try with :
Code: Select all | TOGGLE FULL SIZE
....
if(world[i]=="è") {
world[i]=138
}
....

printerSerial.print(world);


but it is not correct ...I suppose something wrong

Thank You
Giuseppe
toto007
 
Posts: 3
Joined: Sat Nov 24, 2012 8:56 pm

Re: PRINTER: how to convert accented characters in ASCII code?

by toto007 on Tue Dec 04, 2012 1:21 pm

UP
toto007
 
Posts: 3
Joined: Sat Nov 24, 2012 8:56 pm

Re: PRINTER: how to convert accented characters in ASCII code?

by adafruit_support_bill on Tue Dec 04, 2012 1:35 pm

What do you get with your current code?
Try printerSerial.write(138);
User avatar
adafruit_support_bill
 
Posts: 29193
Joined: Sat Feb 07, 2009 9:11 am