diff --git a/stringutilities.py b/stringutilities.py index 3e17e63..ff7d7bb 100644 --- a/stringutilities.py +++ b/stringutilities.py @@ -120,7 +120,7 @@ def run(self, edit): if not region.empty(): text = self.view.substr(region).encode(self.enc()) t = base64.b64encode(text) - txt = str(t,'ascii') + txt = str(t, self.enc()) self.view.replace(edit, region, txt) def enc(self): @@ -137,7 +137,7 @@ def run(self, edit): if not region.empty(): text = self.view.substr(region).encode(self.enc()) t = base64.b64decode(text) - txt = str(t,'ascii') + txt = str(t, self.enc()) self.view.replace(edit, region, txt) def enc(self):