[gnote] List were broken when not in ASCII. (Closes #587070 and dupes)
- From: Hubert Figuière <hub src gnome org>
- To: svn-commits-list gnome org
- Subject: [gnote] List were broken when not in ASCII. (Closes #587070 and dupes)
- Date: Tue, 30 Jun 2009 19:18:40 +0000 (UTC)
commit e771630aa23b27fbdf8e95886073835db5d30ecb
Author: Hubert Figuiere <hub figuiere net>
Date: Tue Jun 30 14:54:57 2009 -0400
List were broken when not in ASCII. (Closes #587070 and dupes)
src/notebuffer.cpp | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/src/notebuffer.cpp b/src/notebuffer.cpp
index d619bb3..8d1f7c3 100644
--- a/src/notebuffer.cpp
+++ b/src/notebuffer.cpp
@@ -1405,6 +1405,7 @@ namespace gnote {
int offset = start.get_offset();
std::stack<TagStart> tag_stack;
TagStart tag_start;
+ Glib::ustring value;
NoteTagTable::Ptr note_table = NoteTagTable::Ptr::cast_dynamic(buffer->get_tag_table());
@@ -1465,9 +1466,12 @@ namespace gnote {
case XML_READER_TYPE_WHITESPACE:
case XML_READER_TYPE_SIGNIFICANT_WHITESPACE:
insert_at = buffer->get_iter_at_offset (offset);
- buffer->insert (insert_at, xml.get_value());
+ value = xml.get_value();
+ buffer->insert (insert_at, value);
- offset += xml.get_value().size();
+ // we need the # of chars *Unicode) and not bytes (ASCII)
+ // see bug #587070
+ offset += value.length();
// If we are inside a <list-item> mark off
// that we have encountered some content
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]