View Single Post
  #6   (View Single Post)  
Old 18th June 2017
Carpetsmoker's Avatar
Carpetsmoker Carpetsmoker is offline
Real Name: Martin
Old man from scene 24
 
Join Date: Apr 2008
Location: Dutchman living in the UK
Posts: 2,196
Default

Quote:
Originally Posted by jggimi View Post
Hello, and welcome!That's my assessment also. Perhaps your interactive use is with a Unicode-capable terminal such as xterm(1), and cron(1) runs in a standard shell which may not have LC_CTYPE set.Python Unicode handling. See https://stackoverflow.com/questions/...ion-20/9942822
That Stack Overflow question is pretty out of date; most of the top answers deal with Python 2 only.
Unicode handling was significantly changed in Python 3, which the OP seems to be using (in fact, it was the entire reason for starting Python 3 in the first place).

At any rate, back to the problem, try setting the PYTHONIOENCODING" environment variable to "utf-8" .
__________________
UNIX was not designed to stop you from doing stupid things, because that would also stop you from doing clever things.
Reply With Quote