View Single Post
Old 05-16-2020, 04:37 PM   #2078
jgoguen
Generally Awesome Person
jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.
 
Posts: 1,100
Karma: 2191133
Join Date: Jan 2013
Location: /dev/kmem
Device: Kobo Clara HD, Kindle Oasis
Quote:
Originally Posted by kovidgoyal View Post
@jgoguen: I would suggest using the calibre prints() function to print or alternately to check for bytes in the log object you are using and force them to unicode.
Today I learned prints() isn't just a wrapper for print() in the Stream classes!


Looking at that shows where I'm going wrong, I'm expecting to need Unicode strings but from the way calibre.prints() works I actually need to be returning bytes instances. I'll work on changing the code to use calibre.prints(), thanks!
jgoguen is offline   Reply With Quote