Re: std::wofstream

From: Chris \( Val \) (chrisval_at_bigpond.com.au)
Date: 12/01/03


Date: Mon, 1 Dec 2003 23:08:07 +1100


"Gene Wirchenko" <gwirchenkoEXCEPT@CAPITALSwencomine.com> wrote in message
news:bsq9sv8j8mjprav6gfhpfn0aqdf3vfcd6s@4ax.com...
| On Wed, 26 Nov 2003 22:50:07 +1100, "Chris \( Val \)"
| <chrisval@bigpond.com.au> wrote:
|
| >"Gene Wirchenko" <gwirchenkoEXCEPT@CAPITALSwencomine.com> wrote in message
| >news:pjd7svksdqdpqfpn95b3feaf35ep1p7ltg@4ax.com...
| >> I have some data in Unicode. I wish to write it to a file. I do
| >> so. The resulting file is ASCII. This will not do. How do I make
| >> sure that the output is Unicode?
|
| >You have to set your O/S and programs to be able
| >to support the output, aka fonts, locale etc...
|
| >Read this:
| >http://www.unicode.org/
|
| That is a sizeable site, and I do not see where the C++
| programming section is, or even if there is one. Could you please be
| more specific?

There is no mention of C++ there, and there wasn't meant to be :-).

It was meant to provide you with some information, that you won't
see the characters you expect, if you do not alter your default
font set.

| I have already done some Web hunting, but have found nothing
| about adjusting the character set, only vague hints.

Well, in windows 2000 and XP for example, you would change the font
notepad uses to the one you want, furthermore, you would no longer
save the file as a plain 'ANSI' text file, but rather to one that
supports the wide character encoding set you wish to use.

For example: 'Unicode', 'Unicode Big Endian' or 'UTF-8' are amongst
the options in notepad.

The locale you use might also play a part.

Cheers.
Chris Val