Message-ID: <3AE099B3.FE657644@jps.net> From: Dennis Yelle X-Mailer: Mozilla 4.75 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.os.msdos.djgpp Subject: string can't read certian characters??? Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 67 Date: Fri, 20 Apr 2001 13:18:59 -0700 NNTP-Posting-Host: 216.119.20.143 X-Complaints-To: abuse AT onemain DOT com X-Trace: nntp3.onemain.com 987797594 216.119.20.143 (Fri, 20 Apr 2001 16:13:14 EDT) NNTP-Posting-Date: Fri, 20 Apr 2001 16:13:14 EDT To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com When I run this program: ------------------------- #include #include #include #include #include unsigned char data[] = { 'd', 0xBC, 0xD2, '\r', '\n', 'e', 0xB2, 0x7B, '\r', '\n', 'd', 0xBC, 0xD2, '\r', '\n', 'e', 0xB2, 0x7B, '\r', '\n', 'f', 0xB2, 0x7B, '\r', '\n' }; void write_it( char* name) { FILE* out = fopen( name, "wb"); assert(out); int count = 0; for( unsigned i=0; i>s;) { cout << s.size() << " " << s << '\n'; } } int main() { write_it( "temp"); read_it( "temp"); return 0; } ---------------------------- I get this output: ------------------------ Wrote 25 characters to the file temp Reading.... 3 d+- 1 e -------------------------- So it looks like string input from a file cannot read some character sequences. Is this expected and desired behavior? Or is it a bug? Dennis Yelle -- I am a computer programmer and I am looking for a job. There is a link to my resume here: http://table.jps.net/~vert/