Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > C++ > UNICODE I/O
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 11 Topic 44152 of 48044
Post > Topic >>

UNICODE I/O

by Ali <ali.baharev@[EMAIL PROTECTED] > Mar 27, 2008 at 05:12 AM

I would like to write a program that can handle non-ANSI characters.
The following code does not work, the output is empty:

#include <fstream>
#include <string>
using namespace std;

int main() {
       wofstream out(L"log");
       if (!out)
               exit(127);
       wstring s(L"=F5=FB=ED=D5=DB=CD");
       out << s << endl;
       out.close();
       return 0;
}

The log file is in ANSI char encoding, and probably that is why the
output fails.

Could anyone help me how to do this?

Many thanks.
 




 11 Posts in Topic:
UNICODE I/O
Ali <ali.baharev@[EMAI  2008-03-27 05:12:14 
Re: UNICODE I/O
Ali <ali.baharev@[EMAI  2008-03-27 05:17:27 
Re: UNICODE I/O
Michael DOUBEZ <michae  2008-03-27 13:33:39 
Re: UNICODE I/O
Ali <ali.baharev@[EMAI  2008-03-27 05:50:45 
Re: UNICODE I/O
Michael DOUBEZ <michae  2008-03-27 15:06:39 
Re: UNICODE I/O
Michael DOUBEZ <michae  2008-03-27 15:11:03 
Re: UNICODE I/O
Tobias Blomkvist <TB@[  2008-03-27 14:40:19 
Re: UNICODE I/O
Ali <ali.baharev@[EMAI  2008-03-27 08:48:21 
Re: UNICODE I/O
Ali <ali.baharev@[EMAI  2008-03-27 10:20:20 
Re: UNICODE I/O
Michael DOUBEZ <michae  2008-03-28 11:12:16 
Re: UNICODE I/O
Michael DOUBEZ <michae  2008-03-28 11:14:12 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Wed Oct 15 22:35:21 CDT 2008.