How to output a Unicode character?

W

WW

Michael said:
Then how to output a Unicode character using Standard C++ (Pure C++).

I have no idea. But do not despair! If you get no useful answer here, post
the question to comp.lang.c++.moderated. There are guys there who work
heavily with UNICODE.
 
K

Kevin Goodsell

Michael said:
Then how to output a Unicode character using Standard C++ (Pure C++).

Standard C++ does not require that an implementation support, or know
anything about Unicode.

The (sort of) portable answer, then, is to determine the values of the
bytes making up the character you want to output, then write those bytes
to your output stream.

-Kevin
 
N

Noah Roberts

Kevin said:
Standard C++ does not require that an implementation support, or know
anything about Unicode.

The (sort of) portable answer, then, is to determine the values of the
bytes making up the character you want to output, then write those bytes
to your output stream.

In other words, write your own wide_char read/writers. You will
probably have to open your stream in binary mode and read/write byte by
byte. Some of those bytes may be standard characters, others my be
encoded Unicode wide chars.

You will want to research how the target system represents unicode in
text streams. In unix this is UTF-8 encoding, others may be same or
different.

Have fun,
NR
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top