Hello.
I'm trying to read a textfile written by the NTBackup utility on
Windows 2003 SBS. The problem is that when i print the output, it
looks like this:
S t a t o : b a c k u p
O p e r a z i o n e : b a c k u p
D e s t i n a z i o n e b a c k u p a t t i v o : F i l e
N o m e s u p p o r t o : " l u m e v e . b k f c r e a t o i
l 2 1 / 0 5 / 2 0 0 7 a l l e 2 3 . 0 0 "
As you can see, there is a space prior to any charater. I know that
unicode characters uses two bytes, so... can be the problem related to
different charset?
If I try to read a new textfile, there are no problem.
This is the relevant portion of the code:
try {
ifstream infile(strLogFi le.c_str());
if (infile.is_open ()) {
string line;
while (getline(infile , line)) {
cout << line << endl;
}
infile.close();
} else {
cerr << "Impossibil e aprire " << strLogFile << endl;
return false;
}
Excuse me for my english.
Thanks
Wx