From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Eli Zaretskii" Newsgroups: gmane.emacs.help Subject: Re: File truncated at ^Z character in windows Date: Sat, 14 Feb 2004 13:52:29 +0200 Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <6654-Sat14Feb2004135229+0200-eliz@elta.co.il> References: Reply-To: Eli Zaretskii NNTP-Posting-Host: deer.gmane.org X-Trace: sea.gmane.org 1076759768 9089 80.91.224.253 (14 Feb 2004 11:56:08 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 14 Feb 2004 11:56:08 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Feb 14 12:56:00 2004 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AryOt-0005qw-00 for ; Sat, 14 Feb 2004 12:55:59 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AryOj-0002rR-5H for geh-help-gnu-emacs@m.gmane.org; Sat, 14 Feb 2004 06:55:49 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AryMS-0001tq-SR for help-gnu-emacs@gnu.org; Sat, 14 Feb 2004 06:53:28 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AryLB-0001FZ-Lu for help-gnu-emacs@gnu.org; Sat, 14 Feb 2004 06:52:40 -0500 Original-Received: from [192.114.186.23] (helo=aragorn.inter.net.il) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AryL5-0001AF-VJ for help-gnu-emacs@gnu.org; Sat, 14 Feb 2004 06:52:04 -0500 Original-Received: from zaretski (pns03-205-122.inter.net.il [80.230.205.122]) by aragorn.inter.net.il (MOS 3.4.4-GR) with ESMTP id CMC28587; Sat, 14 Feb 2004 13:51:56 +0200 (IST) Original-To: help-gnu-emacs@gnu.org X-Mailer: emacs 21.3.50 (via feedmail 8 I) and Blat ver 1.8.9 In-reply-to: (message from John Russell on 13 Feb 2004 16:03:04 -0500) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:16846 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:16846 > From: John Russell > Newsgroups: gnu.emacs.help > Date: 13 Feb 2004 16:03:04 -0500 > > Does anyone know what is special about the ^Z character that makes > the file end like that? The ^Z character is a kind of ``software end-of-file'' on DOS and Windows systems. This is a legacy from the old CP/M family of operating systems, which was a predecessor of DOS and Windows. Many text-oriented programs on Windows, like the notorious Notepad, still keep this back compatibility. Text-mode I/O functions in standard libraries available on Windows signal EOF when they see ^Z, and console I/O does the same when you write text in cooked mode to the shell window. To avoid this truncation, don't use text-mode I/O when you copy files from Unix to Windows. For example, if you use FTP to copy files, issue the `binary' command before the `get' command. When using other methods of copying files, prefer good ports of GNU software that will DTRT and copy the entire file regardless. For example, instead of making a zip file, make a tar file, then untar it on Windows using a port of GNU Tar. If the above doesn't help, please describe how you copied the offending file(s), and you will probably get specific advice for that situation.