Skip to content
Permalink
Browse files

DBManager: fix int/float conversion to unicode (partially revert chan…

…ges in 401f43c and fix #13505)
  • Loading branch information
brushtyler committed Oct 4, 2015
1 parent 01b4554 commit 396ec2290b2e7dfdeaf9657ab08e970439bd0065
Showing with 4 additions and 1 deletion.
  1. +4 −1 python/plugins/db_manager/db_plugins/data_model.py
@@ -76,7 +76,10 @@ def data(self, index, role):
elif isinstance(val, (str, unicode)) and len(val) > 300:
# too much data to display, elide the string
val = val[:300]
return unicode(val, 'utf-8', 'replace') # convert from utf8 and replace errors (if any)
try:
return unicode(val) # convert to unicode
except UnicodeDecodeError:
return unicode(val, 'utf-8', 'replace') # convert from utf8 and replace errors (if any)

def headerData(self, section, orientation, role):
if role != Qt.DisplayRole:

0 comments on commit 396ec22

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