You are here:

C/Wide characters

Advertisement


Question
How to handle Wide characters(unicode characters)?
How to read and write using printf and scanf functions?

Answer
To handle widechars, you will have to use 2 bytes variable as widechar variables.
S, it's better to have a typedef (Usually "short int" type is of 2 bytes) and use that as widechar.
For reading and writing from that variable, you can use scanf() and also printf(). But, you will have to properly interpret the values and do all the modifications yourself.

-ssnkumar

C

All Answers


Answers by Expert:


Ask Experts

Volunteer


Narendra

Expertise

I can answer questions in C related to programming, data structures, pointers and file manipulation. I use Solaris for doing C code and if you have questions related to C programming on Solaris, I will be able to help better.

Experience

6.5

Organizations belong to
Sun Microsystems

Awards and Honors
Brain Bench Certified Expert C programmer.
Advanced System Software Certified

©2012 About.com, a part of The New York Times Company. All rights reserved.