mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-01-11 04:32:36 +01:00
Ensure log files are UTF-8 encoded
The default encoding is platform specific, so problems can arise if we do not make it explicit. Especially on Windows. Freenode appears to be all UTF-8, and irclib is giving us UTF-8 strings, so let's standardize on UTF-8.
This commit is contained in:
parent
ba0ba71bf4
commit
5ecb154186
@ -149,7 +149,7 @@ class ChannelLogger(callbacks.Plugin):
|
|||||||
try:
|
try:
|
||||||
name = self.getLogName(channel)
|
name = self.getLogName(channel)
|
||||||
logDir = self.getLogDir(irc, channel)
|
logDir = self.getLogDir(irc, channel)
|
||||||
log = open(os.path.join(logDir, name), 'a')
|
log = open(os.path.join(logDir, name), encoding='utf-8', mode='a')
|
||||||
logs[channel] = log
|
logs[channel] = log
|
||||||
return log
|
return log
|
||||||
except IOError:
|
except IOError:
|
||||||
|
Loading…
Reference in New Issue
Block a user