PRINTER: how to convert accented characters in ASCII code?

Breakout boards, sensors, other Adafruit kits, etc.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
toto007
 
Posts: 3
Joined: Sat Nov 24, 2012 9:56 pm

PRINTER: how to convert accented characters in ASCII code?

Post by toto007 »

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

....
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 9:56 pm

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

Post by toto007 »

UP

User avatar
adafruit_support_bill
 
Posts: 88093
Joined: Sat Feb 07, 2009 10:11 am

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

Post by adafruit_support_bill »

What do you get with your current code?
Try printerSerial.write(138);

Locked
Please be positive and constructive with your questions and comments.

Return to “Other Products from Adafruit”