[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#1523: [Ivan Shmakov] process-send-string apparently mangles \r into
From: |
Lars Magne Ingebrigtsen |
Subject: |
bug#1523: [Ivan Shmakov] process-send-string apparently mangles \r into \n |
Date: |
Sun, 11 Sep 2011 20:26:13 +0200 |
User-agent: |
Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.50 (gnu/linux) |
Sven Joachim <svenjoac@gmx.de> writes:
> (let* ((coding-system-for-read 'binary)
> (coding-system-for-write 'binary)
> (p (start-process "foo" "*foo*" "od" "-td1")))
> (process-send-string p "\r\n")
> (process-send-eof p))
> ;; => #<process foo>
>
> the `*foo*' buffer contains:
>
> --cut: *foo*--
> 0000000 10 10
> 0000002
>
> Process foo finished
I can confirm this behaviour in Emacs 24. And it's isn't just CRLF
conversion -- all "\r"s are translated into "\n":
(let* ((coding-system-for-read 'binary)
(coding-system-for-write 'binary)
(p (start-process "foo" "*foo*" "od" "-td1")))
(process-send-string p "a\rb\n")
(process-send-eof p))
Gives:
Process foo<2> finished
0000000 97 10 98 10
0000004
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog http://lars.ingebrigtsen.no/
- bug#1523: [Ivan Shmakov] process-send-string apparently mangles \r into \n,
Lars Magne Ingebrigtsen <=