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: Fri, 20 Jun 2003 13:20:48 +0900 (JST) Sender: bug-gnu-emacs-bounces+gnu-bug-gnu-emacs=m.gmane.org@gnu.org Message-ID: <200306200420.NAA24367@etlken.m17n.org> References: <874r3f1ocb.fsf@zamazal.org> <200305300816.RAA21216@etlken.m17n.org> <87el2bi4uy.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 1056082875 829 80.91.224.249 (20 Jun 2003 04:21:15 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Fri, 20 Jun 2003 04:21:15 +0000 (UTC) Cc: bug-gnu-emacs@gnu.org Original-X-From: bug-gnu-emacs-bounces+gnu-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jun 20 06:21:13 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 19TDOj-0000D3-00 for ; Fri, 20 Jun 2003 06:21:13 +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 19TDOX-00025D-1d for gnu-bug-gnu-emacs@m.gmane.org; Fri, 20 Jun 2003 00:21:01 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.20) id 19TDOS-00020F-TG for bug-gnu-emacs@gnu.org; Fri, 20 Jun 2003 00:20:56 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.20) id 19TDOR-000204-K1 for bug-gnu-emacs@gnu.org; Fri, 20 Jun 2003 00:20:56 -0400 Original-Received: from tsukuba.m17n.org ([192.47.44.130]) by monty-python.gnu.org with esmtp (Exim 4.20) id 19TDOQ-0001y8-Qg; Fri, 20 Jun 2003 00:20:55 -0400 Original-Received: from fs.m17n.org (fs.m17n.org [192.47.44.2])h5K4Knu03573; Fri, 20 Jun 2003 13:20:49 +0900 (JST) (envelope-from handa@m17n.org) Original-Received: from etlken.m17n.org (etlken.m17n.org [192.47.44.125]) h5K4Km920421; Fri, 20 Jun 2003 13:20:48 +0900 (JST) Original-Received: (from handa@localhost) by etlken.m17n.org (8.8.8+Sun/3.7W-2001040620) id NAA24367; Fri, 20 Jun 2003 13:20:48 +0900 (JST) Original-To: rms@gnu.org In-reply-to: (message from Richard Stallman on Thu, 19 Jun 2003 23:15:47 -0400) 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) Original-cc: pdm@zamazal.org 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:5353 X-Report-Spam: http://spam.gmane.org/gmane.emacs.bugs:5353 In article , Richard Stallman writes: > The encoding routine correctly produces CR LF, but somehow > CR is converted to LF (perhaps by pty because the following > test works correctly). > Is it the pty and tty mechanism that does the conversion, perhaps? Perhaps. I found this code in child_setup_tty (in sysdep.c). #if 0 /* This causes bugs in (for instance) telnet to certain sites. */ s.main.c_iflag &= ~ICRNL; /* Disable map of CR to NL on input */ #ifdef INLCR /* Just being cautious, since I can't check how widespread INLCR is--rms. */ s.main.c_iflag &= ~INLCR; /* Disable map of NL to CR on input */ #endif #endif I tried to change the first line above to "#if 1". The newly build emacs doesn't do CR->LF conversion, thus works well with the test case (utf-8-bug.el). --- Ken'ichi HANDA handa@m17n.org