Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.albasani.net!news2.arglkargh.de!noris.net!newsfeed.arcor.de!newsspool3.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Lars Erdmann" Newsgroups: comp.os.os2.programmer.porting References: <0KhBVN5juOdd-pn2-Od3ScT2CWGXd@neo_iii> <0KhBVN5juOdd-pn2-W6Dh9n8j6eZW@neo_iii> <0KhBVN5juOdd-pn2-uewIjdkqIdes@neo_iii> <0KhBVN5juOdd-pn2-etRSoGxQzz6z@neo_iii> <0KhBVN5juOdd-pn2-zuHodgfNGl5U@neo_iii> Subject: Re: SOLVED!: Problem: error in iconv_open Date: Sun, 10 Jul 2011 20:41:13 +0200 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6109 Lines: 20 Message-ID: <4e19f24a$0$6584$9b4e6d93@newsspool3.arcor-online.net> Organization: Arcor NNTP-Posting-Date: 10 Jul 2011 20:41:15 CEST NNTP-Posting-Host: c6090db4.newsspool3.arcor-online.net X-Trace: DXC=8G?70Z>n^JmJ00P1S40fZgMcF=Q^Z^V3h4Fo<]lROoRa8kF It was not the random number generator. I built another release using > another generator, which uses a specific algorithm, and noticed the > very same problem. So I checked out the fopen () calls, as the program > worked fine with text file, and guess what? > > Yes, the original source opens files without the "binary" flag. adding > "b" to all the fopen () calls solved the problem. Use of "fopen": The usual pitfall when porting UNIX type programs to Windows or OS/2. UNIX makes no distinction between text and binary files. Therefore it opens all files as binary files (even though in the C-RTL you can specify binary or text). Windows and OS/2 on the other hand open files as text files as a default. (unless the C-RTL specifies otherwise). Lars