From d4443d944c479d633857b7d7d5ca88f2871841bb Mon Sep 17 00:00:00 2001 From: Benny Malengier Date: Thu, 14 Feb 2008 08:58:37 +0000 Subject: [PATCH] 2008-02-14 Benny Malengier * src/DisplayModels/_NoteModel.py: use unicode object internally, #1739 svn: r10030 --- ChangeLog | 3 +++ src/DisplayModels/_NoteModel.py | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 3c5017afc..7d8af7b97 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ +2008-02-14 Benny Malengier + * src/DisplayModels/_NoteModel.py: use unicode object internally, #1739 + 2008-02-13 Douglas S. Blank * src/DataViews/GrampletView.py: right-click on name link edits * src/plugins/DefaultGramplets.py: change tooltip of relation gramplet diff --git a/src/DisplayModels/_NoteModel.py b/src/DisplayModels/_NoteModel.py index 49855596c..549e070ee 100644 --- a/src/DisplayModels/_NoteModel.py +++ b/src/DisplayModels/_NoteModel.py @@ -100,7 +100,9 @@ class NoteModel(BaseModel): return unicode(str(temp)) def column_preview(self,data): - note = " ".join(data[2].encode('utf-8').split()) + #data is the encoding in the database, make it a unicode object + #for universal work + note = " ".join(unicode(data[2]).split()) note = re.sub(r'(<.*?>)', '', note) note = note.replace('&', '&') note = note.replace('<', '<')