Closed gunnbr closed 7 years ago
After running into another similar exception in another place, I realize that this exception comes from attempting to log a message that contains unicode characters. The problem is that logger._encoding is set to ascii, but ascii can't handle emoji.
I couldn't find a way to set the default encoding of the logger, so I ended up just calling decode("utf-8") on each user entered string before logging it. Fixed it for factoids, info, and quit messages.
The following quit message:
Caused an exception:
gthx did not crash, but it would be nice to handle this more gracefully and properly.