[CF-Devel] Patch: collect_images.pl
crossfire-devel at archives.real-time.com
crossfire-devel at archives.real-time.com
Fri Nov 28 12:58:51 CST 2003
On Fri, Nov 28, 2003 at 07:47:45PM +0100, Nicolas Weeger wrote:
>
Hello.
>
Just a small patch to make lib/adm/collect_images.pl work under Windows.
>
Basically just force the file mode to 'binary' using 'binarymode'
>
(apparently Windows's default mode is not binary :))
[snip]
The basic problem is that Windows differentiates between text files
(translate between \n and \r\n) and binary files, whereas UNIX doesn't. So
"text mode" works just fine on binary files in UNIX, but breaks horribly
under Windows (anything resembling \r\n gets mangled on read, and all \n
gets mangled on write). Perl uses text mode by default, which is fine for
UNIX, but breaks on Windows when you manipulate binary files.
T
--
Spaghetti code may be tangly, but lasagna code is just cheesy.
_______________________________________________
crossfire-devel mailing list
crossfire-devel at lists.real-time.com
https://mailman.real-time.com/mailman/listinfo/crossfire-devel
More information about the crossfire
mailing list