This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: test unicode outfile


On 30 June 2011 19:00, eric wrote:
> Dear Axel Freyn(and any g++ programers/testers):
>
> ?Thanks your point out.
> ?How about test my first program, which I copied from book(c++
> cookbook)(chapter 13 section 1, page 467)
> in your system, is that really output anything to file(length > 0)?

With that program, no, the file is empty.

If you add this line before writing to the file it works:
 out.imbue(locale("en_GB.utf8"));

$ ls -l unicode_txt
-rw-r--r-- 1 redi redi 10 Jun 30 18:12 unicode_txt

That's on a Fedora 12-based OS using GCC 4.4.3


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]