paste icon indicating copy to clipboard operation
paste copied to clipboard

translogger can fail if locale month is non ascii

Open gnafou opened this issue 4 years ago • 1 comments

https://github.com/cdent/paste/blob/b0241aea21d9bd07598e477ef77846d1089169a5/paste/translogger.py#L93

strftime %b changed to %m solves this

gnafou avatar Feb 28 '20 15:02 gnafou

Making that change would change the format or the logger and thus anything that wants to process the log, making this a backward incompatible change, so probably not the best way to fix this.

The logger itself should be able to deal with unicode, so the underlying issue here is with how the logger is set up, not with what is being logged. Have a look at https://stackoverflow.com/questions/1545263/utf-8-in-python-logging-how for some related ideas and issues.

cdent avatar Feb 28 '20 15:02 cdent