From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Kenichi Handa Newsgroups: gmane.emacs.bugs Subject: Re: Process output truncation when using UTF-8 Date: Thu, 19 Jun 2003 13:24:19 +0900 (JST) Sender: bug-gnu-emacs-bounces+gnu-bug-gnu-emacs=m.gmane.org@gnu.org Message-ID: <200306190424.NAA22942@etlken.m17n.org> References: <874r3f1ocb.fsf@zamazal.org> <200305300816.RAA21216@etlken.m17n.org> <87el2bi4uy.fsf@zamazal.org> <200306041248.VAA01372@etlken.m17n.org> <87u1aui7nj.fsf@zamazal.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.3 - "Ushinoya") Content-Type: text/plain; charset=US-ASCII X-Trace: main.gmane.org 1055996678 1236 80.91.224.249 (19 Jun 2003 04:24:38 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Thu, 19 Jun 2003 04:24:38 +0000 (UTC) Cc: bug-gnu-emacs@gnu.org Original-X-From: bug-gnu-emacs-bounces+gnu-bug-gnu-emacs=m.gmane.org@gnu.org Thu Jun 19 06:24:37 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19SqyS-0000Je-00 for ; Thu, 19 Jun 2003 06:24:36 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.20) id 19SqyL-0007LO-Iy for gnu-bug-gnu-emacs@m.gmane.org; Thu, 19 Jun 2003 00:24:29 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.20) id 19SqyI-0007EO-EZ for bug-gnu-emacs@gnu.org; Thu, 19 Jun 2003 00:24:26 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.20) id 19SqyG-0007Bt-RA for bug-gnu-emacs@gnu.org; Thu, 19 Jun 2003 00:24:25 -0400 Original-Received: from tsukuba.m17n.org ([192.47.44.130]) by monty-python.gnu.org with esmtp (Exim 4.20) id 19SqyF-00079s-U0 for bug-gnu-emacs@gnu.org; Thu, 19 Jun 2003 00:24:24 -0400 Original-Received: from fs.m17n.org (fs.m17n.org [192.47.44.2])h5J4OJu12401; Thu, 19 Jun 2003 13:24:19 +0900 (JST) (envelope-from handa@m17n.org) Original-Received: from etlken.m17n.org (etlken.m17n.org [192.47.44.125]) h5J4OJ911836; Thu, 19 Jun 2003 13:24:19 +0900 (JST) Original-Received: (from handa@localhost) by etlken.m17n.org (8.8.8+Sun/3.7W-2001040620) id NAA22942; Thu, 19 Jun 2003 13:24:19 +0900 (JST) Original-To: pdm@zamazal.org In-reply-to: <87u1aui7nj.fsf@zamazal.org> (message from Milan Zamazal on Fri, 13 Jun 2003 12:38:56 +0200) User-Agent: SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.2 Emacs/21.2.92 (sparc-sun-solaris2.6) MULE/5.0 (SAKAKI) X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Bug reports for GNU Emacs, the Swiss army knife of text editors List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: bug-gnu-emacs-bounces+gnu-bug-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.bugs:5343 X-Report-Spam: http://spam.gmane.org/gmane.emacs.bugs:5343 >>>>>> "KH" == Kenichi Handa writes: KH> In article <87el2bi4uy.fsf@zamazal.org>, Milan Zamazal KH> writes: >>> Thank you. The case I've reported works well in Emacs 21.3, but >>> this one still truncates the output: KH> [...] >>> The difference is that the process encoding is set to utf-8-dos >>> now instead of utf-8. KH> Thank you for testing it. Please try this additional patch. > Thank you. The file is no longer truncated, but there's an extra blank > line inserted after each line of the text. The unchanged test case > reproduces the problem: > [2 utf-8-bug.el ] > [3 ] > It seems LF-LF is inserted at the ends of lines, instead of CR-LF. I can reproduce this bug, but it's not an error of encoding routine. I can reproduce this bug also with this test case. (set-language-environment "English") (let ((process (start-process "foo" nil "tee" "/tmp/foo"))) (set-process-coding-system process 'raw-text-dos 'raw-text-dos) (help-with-tutorial) (set-buffer "TUTORIAL") (process-send-string process (buffer-substring-no-properties (point-min) (point-max))) (process-send-eof process)) The encoding routine correctly produces CR LF, but somehow CR is converted to LF (perhaps by pty because the following test works correctly). (set-language-environment "English") (let* ((process-connection-type nil) (process (start-process "foo" nil "tee" "/tmp/foo"))) (set-process-coding-system process 'raw-text-dos 'raw-text-dos) (help-with-tutorial) (set-buffer "TUTORIAL") (process-send-string process (buffer-substring-no-properties (point-min) (point-max))) (process-send-eof process)) --- Ken'ichi HANDA handa@m17n.org