QString(str(contact.name)) will add this to the QStandardItem, but I wont get the non-ascii symbols. Instead of that, I'll get... weard letters from the ascii table.
I have been looking the other front-end (the gtk one) (I'm working on the qt4 one) and the string there is assigned this way:
self._model.set_value(citer, 2, common.escape_pango(str(contactview.name)))
self._model.set_value(citer, 2, common.escape_pango(str(contactview.name)))
To copy to clipboard, switch view to plain text mode
and escape_pango is like this:
def escape_pango(str):
str = gobject.markup_escape_text(str)
str = str.replace('\n',' ')
return str
def escape_pango(str):
str = gobject.markup_escape_text(str)
str = str.replace('\n',' ')
return str
To copy to clipboard, switch view to plain text mode
So, I need to parse the html formatted contact.name string. What could I use? cgi.escape? Could you give me an example if that's the right one, please?
Bookmarks