Skip to content
Permalink
Browse files

Merge pull request #6871 from borysiasty/dbmanager_unicode_fix

[DBManager] Fix encoding error if a field/table/database/file name co…
  • Loading branch information
borysiasty committed Apr 27, 2018
2 parents 9ce55ca + e5aaf6a commit 85fd681e432c86dd7399fbbba49b3fdfefbddc63
Showing with 8 additions and 1 deletion.
  1. +8 −1 python/plugins/db_manager/db_plugins/html_elems.py
@@ -36,7 +36,14 @@ def toHtml(self):
if hasattr(self.data, 'toHtml'):
return self.data.toHtml()

html = unicode(self.data).replace("\n", "<br>")
if isinstance(self.data, str):
html = unicode(self.data, encoding='utf-8', errors='replace')
elif isinstance(self.data, unicode):
html = self.data
else:
html = unicode(self.data)
html = html.replace("\n", "<br>")

return html

def hasContents(self):

0 comments on commit 85fd681

Please sign in to comment.
You can’t perform that action at this time.