Hi, Im trying to create a csv file in Unicode format. Im using wofstream to create the file.
Im writing a series of strings and double values to the stream. I find that the values written to wofstream stop after writing 9 sets of data. There are about 37 sets of data. What could be the issue? The code that writes data to wofstream is as below: for ( int i=0; i<str.length(); i++ ) { wchar_t wc = ( str[i]<<16 ); os << wc; // os.seekp( -1, ios_base::cur ); } Where str: wstring. os: wofstream gcc version 3.4.4 20050721 (Red Hat 3.4.4-2) The above code is called 30-40 times for different values of str. If I uncomment os.seekp() statement, the file is zero bytes. os.fail() is not showing any error. Unable to figure where things are failing. Im able to output contents of str on standard ouput. But not able to write to file completely. Regards, Radhika -- Summary: Unable to write data to wofstream Product: gcc Version: 3.4.4 Status: UNCONFIRMED Severity: critical Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: radhika dot ganganna at oracle dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38741