View Single Post
  #6   (View Single Post)  
Old 18th June 2017
Carpetsmoker's Avatar
Carpetsmoker Carpetsmoker is offline
Real Name: Martin
Tcpdump Spy
Join Date: Apr 2008
Location: New Zealand
Posts: 2,201

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
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