diff -r 26596a6b6518 mercurial/patch.py
--- a/mercurial/patch.py	Fri Feb 23 17:54:34 2007 +0200
+++ b/mercurial/patch.py	Sun Mar 04 18:04:35 2007 +0100
@@ -283,7 +283,7 @@ def patch(patchname, ui, strip=1, cwd=No
         args = []
         if cwd:
             args.append('-d %s' % util.shellquote(cwd))
-        fp = os.popen('%s %s -p%d < %s' % (patcher, ' '.join(args), strip,
+        fp = os.popen('%s %s -p%d --binary < %s' % (patcher, ' '.join(args), strip,
                                            util.shellquote(patchname)))
 
         for line in fp:
