Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Encode the text as unicode before searching for spaces, in order to m…

…ake sure that the character offsets are correct when dealing with multibyte characters.
  • Loading branch information...
commit 84b965fd02379a93a68d35cbc20a784ec6fe7e31 1 parent 5218467
@jonleighton authored
Showing with 1 addition and 0 deletions.
  1. +1 −0  trailsave.py
View
1  trailsave.py
@@ -58,6 +58,7 @@ def strip_trailing_spaces(self):
"""
text = self.doc.get_text(self.doc.get_start_iter(), self.doc.get_end_iter(), False)
+ text = unicode(text, 'utf-8')
start_iter = self.doc.get_start_iter()
end_iter = self.doc.get_start_iter()
Please sign in to comment.
Something went wrong with that request. Please try again.