[gedit-plugins/wip/python3] Unicode stuff



commit 3f512902d1f43245707dba1adc8ed81bd28873c2
Author: Ignacio Casal Quinteiro <icq gnome org>
Date:   Tue Nov 6 20:12:56 2012 +0100

    Unicode stuff

 plugins/commander/modules/align.py |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/plugins/commander/modules/align.py b/plugins/commander/modules/align.py
index 4beb68a..255fa6e 100644
--- a/plugins/commander/modules/align.py
+++ b/plugins/commander/modules/align.py
@@ -210,7 +210,7 @@ def _regex(view, reg, group, additional_ws, add_ws_group, flags=0):
     if not end.ends_line():
         end.forward_to_line_end()
 
-    lines = unicode(start.get_text(end), 'utf-8').splitlines()
+    lines = start.get_text(end).splitlines()
     newlines = []
     num = 0
     tabwidth = view.get_tab_width()
@@ -228,7 +228,7 @@ def _regex(view, reg, group, additional_ws, add_ws_group, flags=0):
             line.append(i, al + additional_ws, group, add_ws_group)
 
     # Replace lines
-    aligned = unicode.join(u'\n', [x.newline for x in newlines])
+    aligned = str.join('\n', [x.newline for x in newlines])
 
     buf.begin_user_action()
     buf.delete(bounds[0], bounds[1])



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]