Log_file encoding

Hello,

I have notice that when i use opennmt to translate in google colab, my log file come out with “UFT-8” encoding, but if I do it in command line on my own computer it’s come out has “ANSI”.

Is there a way to control the file encoding before it’s saved?

This case is not handled by default but it could probably be fairly easy to add with the encoding kwarg here:

as documented here:
https://docs.python.org/3/library/logging.handlers.html#filehandler

1 Like