Skip to content

Commit 02df4a3

Browse files
committed
Use 'replace' when encoding unicode device strings
Closes #62.
1 parent 56f8c3f commit 02df4a3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sounddevice.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1913,7 +1913,7 @@ def __repr__(self):
19131913
outs=info['max_output_channels'])
19141914
for idx, info in enumerate(self))
19151915
if _sys.version_info.major < 3:
1916-
return text.encode(_sys.stdout.encoding or 'utf-8')
1916+
return text.encode(_sys.stdout.encoding or 'utf-8', 'replace')
19171917
return text
19181918

19191919

0 commit comments

Comments
 (0)