fix latin-1 bug

--HG--
branch : pmacs2
This commit is contained in:
Erik Osheim 2009-07-11 22:07:06 -04:00
parent 52cfd174f1
commit f274cdd973
1 changed files with 4 additions and 4 deletions

View File

@ -685,14 +685,14 @@ class FileBuffer(Buffer):
try:
data = self.make_string()
if self.windows[0].mode.savetabs:
data = data.replace(" ", "\t").encode(self.codec)
data = self.write_filter(data)
data = data.replace(" ", "\t")
data = self.write_filter(data.encode(self.codec))
f2 = self._open_file_w(self.path, preserve=False)
f2.write(self.bytemark + data)
f2.close()
except Exception, e:
#except Exception, e:
except NameError, e:
if exists: shutil.copyfile(temp_path, self.path)
raise e
else: