|
From: | Antonio Diaz Diaz |
Subject: | Re: [Bug-ocrad] Ocrad opens files in text mode |
Date: | Sun, 22 Oct 2006 00:35:01 +0200 |
User-agent: | Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.7.12) Gecko/20050923 |
address@hidden wrote:
In the SpamBayes project (http://www.spambayes.org/) we're starting to use ocrad as an OCR tool. It works well on Unix-oid systems, but fails on Windows. We tracked it down to the fact that the input files are not opened in binary mode: if( std::strcmp( infile_name, "-" ) == 0 ) infile = stdin; else infile = std::fopen( infile_name, "r" ); There should be a "b" in that mode string. Alas, it's not clear how you can place stdin in binary mode, so input redirection will probably always fail.
I didn't add the "b" because there is no difference between text and binary files in POSIX systems. But Microsoft is always ready to annoy me. :)
I'll add the "b" for the next version, but as you say input redirection will probably always fail.
Regards, Antonio.
[Prev in Thread] | Current Thread | [Next in Thread] |