get "run-program" output stream to string error on windows

Bug #2110525 reported by awlygj
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SBCL
Fix Released
Undecided
Unassigned

Bug Description

* (with-output-to-string (s) (run-program "c:\\windows\\system32\\cmd.exe" '("/c" "echo" "批处理文件") :output s))

debugger invoked on a TYPE-ERROR @1000AC7987 in thread
#<THREAD tid=4496 "main thread" RUNNING {1100BD8003}>:
  The value
    -26
  is not of type
    (UNSIGNED-BYTE 8)
  when setting an element of (ARRAY (UNSIGNED-BYTE 8))

Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL.

restarts (invokable by number or by possibly-abbreviated name):
  0: [ABORT] Exit debugger, returning to top level.

((LABELS SB-WIN32::COPY :IN SB-WIN32::WIN32-PROCESS-WAIT) #S(SB-WIN32::IO-COPIER :PIPE 588 :STREAM #<SB-IMPL::STRING-OUTPUT-STREAM {5FF3E3}> :EXTERNAL-FORMAT :DEFAULT :BUFFER #<SB-ALIEN-INTERNALS:ALIEN-VALUE :SAP #X01036DF0 :TYPE (* (SB-ALIEN:SIGNED 8))> :EVENT 576 :OVERLAPPED #<SB-ALIEN-INTERNALS:ALIEN-VALUE :SAP #X01031730 :TYPE (* (SB-ALIEN:STRUCT SB-WIN32::OVERLAPPED (SB-WIN32::INTERNAL (* #) :OFFSET 0) (SB-WIN32::INTERNAL-HIGH (* #) :OFFSET 64) (SB-WIN32::OFFSET (SB-ALIEN:UNSIGNED 32) :OFFSET 128) (SB-WIN32::OFFSET-HIGH (SB-ALIEN:UNSIGNED 32) :OFFSET 160) (SB-WIN32::EVENT (SB-ALIEN:SIGNED 64) :OFFSET 192)))>))
0] 0

chcp is 936.

SBCL 2.5.4

awlygj (awlygj)
description: updated
Stas Boukarev (stassats)
Changed in sbcl:
status: New → Fix Committed
Changed in sbcl:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.