make sure we write profile README in utf8

This commit is contained in:
Damien Elmes 2012-07-28 11:13:34 +09:00
parent 15dd3d5a5d
commit f7b41a11f6

View file

@ -227,13 +227,13 @@ create table if not exists profiles
if self.firstRun: if self.firstRun:
self.create(_("User 1")) self.create(_("User 1"))
p = os.path.join(self.base, "README.txt") p = os.path.join(self.base, "README.txt")
open(p, "w").write(_("""\ open(p, "w").write((_("""\
This folder stores all of your Anki data in a single location, This folder stores all of your Anki data in a single location,
to make backups easy. To tell Anki to use a different location, to make backups easy. To tell Anki to use a different location,
please see: please see:
%s %s
""") % (appHelpSite + "#startupopts")) """) % (appHelpSite + "#startupopts")).encode("utf8"))
def _pwhash(self, passwd): def _pwhash(self, passwd):
return checksum(unicode(self.meta['id'])+unicode(passwd)) return checksum(unicode(self.meta['id'])+unicode(passwd))