public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/38741]  New: Unable to write data to wofstream
@ 2009-01-06  9:47 radhika dot ganganna at oracle dot com
  2009-01-06 20:23 ` [Bug libstdc++/38741] " pinskia at gcc dot gnu dot org
                   ` (14 more replies)
  0 siblings, 15 replies; 16+ messages in thread
From: radhika dot ganganna at oracle dot com @ 2009-01-06  9:47 UTC (permalink / raw)
  To: gcc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1297 bytes --]

Hi,

I’m trying to create a csv file in Unicode format. I’m using wofstream to
create the file. 

I’m 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. 

I’m 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


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2009-08-03 20:16 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-01-06  9:47 [Bug c++/38741] New: Unable to write data to wofstream radhika dot ganganna at oracle dot com
2009-01-06 20:23 ` [Bug libstdc++/38741] " pinskia at gcc dot gnu dot org
2009-01-07  6:35 ` radhika dot ganganna at oracle dot com
2009-01-07 10:58 ` radhika dot ganganna at oracle dot com
2009-01-08  8:58 ` radhika dot ganganna at oracle dot com
2009-01-08  8:59 ` radhika dot ganganna at oracle dot com
2009-01-08 14:36 ` paolo dot carlini at oracle dot com
2009-01-09  4:44 ` radhika dot ganganna at oracle dot com
2009-01-09  9:41 ` paolo dot carlini at oracle dot com
2009-01-09  9:56 ` paolo dot carlini at oracle dot com
2009-01-09 10:09 ` radhika dot ganganna at oracle dot com
2009-01-09 10:15 ` paolo dot carlini at oracle dot com
2009-01-09 16:58 ` sebor at roguewave dot com
2009-01-12 10:48 ` radhika dot ganganna at oracle dot com
2009-01-12 11:11 ` paolo dot carlini at oracle dot com
2009-08-03 20:16 ` paolo dot carlini at oracle dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).