From 0bd55a27f2f14dd434c828f4a061f366b39dda92 Mon Sep 17 00:00:00 2001 From: mathieui Date: Thu, 13 Sep 2012 09:48:35 +0200 Subject: Fix TBs when the system is not in utf-8 by default (force every file opening to be with the utf-8 encoding) --- src/roster.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/roster.py') diff --git a/src/roster.py b/src/roster.py index 12c529ba..ac25d525 100644 --- a/src/roster.py +++ b/src/roster.py @@ -207,7 +207,7 @@ class Roster(object): if p.isfile(path): return try: - f = open(path, 'w+') + f = open(path, 'w+', encoding='utf-8') f.writelines([i + "\n" for i in self.contacts]) f.close() return True -- cgit v1.2.3