Skip to content
Permalink
Browse files

[DBManager] Fix encoding error if a field/table/database/file name co…

…ntains unicode characters
  • Loading branch information
borysiasty committed Apr 26, 2018
1 parent 9ce55ca commit b822fe750f40d99e3b161ecaa5bdb2b8c501f386
Showing with 6 additions and 1 deletion.
  1. +6 −1 python/plugins/db_manager/db_plugins/html_elems.py
@@ -36,7 +36,12 @@ 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')
else:
html = unicode(self.data)
html = html.replace("\n", "<br>")

return html

def hasContents(self):

0 comments on commit b822fe7

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