diff --git a/pym/cl_opt.py b/pym/cl_opt.py index bd8a83c..833677e 100644 --- a/pym/cl_opt.py +++ b/pym/cl_opt.py @@ -334,6 +334,12 @@ is used in conjunction with the option '-v --vars'") epilog=epilog) self.formatter._long_opt_fmt = "%s %s" + def _get_encoding(self, file): + encoding = getattr(file, "encoding", None) + if not encoding: + encoding = "UTF-8" + return encoding + def get_usage(self): """Replace standard help header""" if self.usage: