Skip to content

Commit e2adc1e

Browse files
committed
Don't force printing to be UTF-8
1 parent 2763841 commit e2adc1e

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

output.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,10 +115,12 @@ func (t *Terminal) handleOutput(buf []byte) []byte {
115115
break
116116
}
117117
if r == utf8.RuneError && size == 1 { // not UTF-8
118-
if t.debug {
119-
log.Println("Invalid UTF-8", buf[0])
118+
if !t.state.printing {
119+
if t.debug {
120+
log.Println("Invalid UTF-8", buf[0])
121+
}
122+
continue
120123
}
121-
continue
122124
}
123125

124126
if t.state.printing {

0 commit comments

Comments
 (0)