def root_folder(self, f):
header = f.header.replace(".", ".\n")
header = header.replace("<", "\n<", 3)[1:]
- header_file = open("header", 'wt')
+ header_file = open("header", 'wt', encoding='utf-8')
header_file.write(header + "\n")
header_file.write('<H1>%s</H1>\n\n' % f.name)
if f.comment: header_file.write('<DD>%s\n' % f.comment)
self.outfile.write("\nLevel: %s\nRuler: YES\n" % (level+1))
def store(self, root_folder):
- self.outfile = open(self.filename, 'wt')
+ self.outfile = open(self.filename, 'wt', encoding='utf-8')
root_folder.walk_depth(self)
self.outfile.close()
self.folder_stack = [root_folder]
self.current_folder = root_folder
- header_file = open("header", 'rt')
+ header_file = open("header", 'rt', encoding='utf-8')
header = header_file.read()
header_file.close()
def store(self, root_folder):
root_folder.walk_depth(self)
- outfile = open(self.filename, 'wt')
+ outfile = open(self.filename, 'wt', encoding='utf-8')
json.dump(self.dict, outfile)
outfile.close()
del self.dict
def load(self):
- infile = open(self.filename, 'rt')
+ infile = open(self.filename, 'rt', encoding='utf-8')
bkmk_s = infile.read()
infile.close()