bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Process output truncation when using UTF-8


From: Kenichi Handa
Subject: Re: Process output truncation when using UTF-8
Date: Thu, 19 Jun 2003 13:24:19 +0900 (JST)
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)

>>>>>>  "KH" == Kenichi Handa <handa@m17n.org> writes:

KH>  In article <87el2bi4uy.fsf@zamazal.org>, Milan Zamazal
KH>  <pdm@zamazal.org> 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 <application/emacs-lisp (7bit)>]

> [3  <text/plain (7bit)>]

> 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]