Hi,<div><br></div><div>I found bug in implementation stream-write-string for dual-channel-gray-stream class: lost last  #\Newline character.</div><div>Patch:</div><div><br></div><div><div>diff --git a/src/streams/gray/gray-stream-methods.lisp b/src/streams/gray/gray-stream-methods.lisp</div>
<div>index 43f4694..9d8b720 100644</div><div>--- a/src/streams/gray/gray-stream-methods.lisp</div><div>+++ b/src/streams/gray/gray-stream-methods.lisp</div><div>@@ -492,13 +492,13 @@</div><div>            (ef (external-format-of stream))</div>
<div>            (line-terminator (babel:external-format-eol-style ef)))</div><div>       (loop :for off1 := start :then (1+ off2)</div><div>-            :for nl-off := (position #\Newline string :start off1)</div><div>+            :for nl-off := (position #\Newline string :start off1 :end end)</div>
<div>             :for off2 := (or nl-off end)</div><div>-         :when nl-off :do (%write-line-terminator stream line-terminator)</div><div>          :when (> off2 off1) :do</div><div>          ;; FIXME: should probably convert directly to a foreign buffer?</div>
<div>          (setf octets (%to-octets string off1 off2 ef))</div><div>          (%write-simple-array-ub8 stream octets 0 (length octets))</div><div>+         :when nl-off :do (%write-line-terminator stream line-terminator)</div>
<div>          :while (< off2 end))))</div><div>   (values string))</div><div> </div><div><br></div><div>Andrey</div></div>