          self.popMenuInbox.addAction( self.actionReply )
          self.popMenuInbox.addAction( self.actionAddSenderToAddressBook )
          self.popMenuInbox.addSeparator()
-@@ -4637,6 +4640,16 @@ class MyForm(QtGui.QMainWindow):
+@@ -4637,6 +4640,23 @@ class MyForm(QtGui.QMainWindow):
          event.accept()
          raise SystemExit
  
 +    def on_action_InboxMsgForceHtml(self):
-+        lines = str(self.ui.textEditInboxMessage.toPlainText()).split('\n')
++        # Updated to work with all characters. Previously, non-english characters caused errors.
++        try:
++            lines = str(self.ui.textEditInboxMessage.toPlainText()).split('\n')
++        except UnicodeEncodeError:
++            currentInboxRow = self.ui.tableWidgetInbox.currentRow()
++            self.ui.textEditInboxMessage.setHtml(self.ui.tableWidgetInbox.item(currentInboxRow,2).data(Qt.UserRole).toPyObject())
++            return
 +        from_prefix = 'Message ostensibly from '
 +        for i in xrange(len(lines)):
 +            if lines[i].find(from_prefix) != -1:

+            elif lines[i] == '------------------------------------------------------':
+                lines[i] = '<hr>'
+        content = '\n'.join(lines)
+        self.ui.textEditInboxMessage.setHtml(QtCore.QString(content))
 
     def on_action_InboxReply(self):
         currentInboxRow = self.ui.tableWidgetInbox.currentRow()
-- 
1.7.9.5


From d94397443963a3dcad267cbb25dd2128c352bc6b Mon Sep 17 00:00:00 2001
From: delicatebits <delicatebits@server.fake>
Date: Mon, 1 Apr 2013 20:52:22 -0400
Subject: [PATCH 2/2] Updated to catch exception

---
 bitmessagemain.py |    9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/bitmessagemain.py b/bitmessagemain.py
index 60dd894..f4cf3d5 100755
--- a/bitmessagemain.py
+++ b/bitmessagemain.py
@@ -4641,7 +4641,13 @@ class MyForm(QtGui.QMainWindow):
         raise SystemExit
 
     def on_action_InboxMsgForceHtml(self):
-        lines = str(self.ui.textEditInboxMessage.toPlainText()).split('\n')
+        # Updated to work with all characters. Previously, non-english characters caused errors.
+        try:
+            lines = str(self.ui.textEditInboxMessage.toPlainText()).split('\n')
+        except UnicodeEncodeError:
+            currentInboxRow = self.ui.tableWidgetInbox.currentRow()
+            self.ui.textEditInboxMessage.setHtml(self.ui.tableWidgetInbox.item(currentInboxRow,2).data(Qt.UserRole).toPyObject())
+            return
         from_prefix = 'Message ostensibly from '
         for i in xrange(len(lines)):
             if lines[i].find(from_prefix) != -1:
@@ -4649,6 +4655,7 @@ class MyForm(QtGui.QMainWindow):
             elif lines[i] == '------------------------------------------------------':
                 lines[i] = '<hr>'
         content = '\n'.join(lines)
+        content = content.replace('\n\n', '<br><br>')
         self.ui.textEditInboxMessage.setHtml(QtCore.QString(content))
 
     def on_action_InboxReply(self):
-- 
1.7.9.5


diff --git a/bitmessagemain.py b/bitmessagemain.py
index 2b30ea5..f4cf3d5 100755
--- a/bitmessagemain.py
+++ b/bitmessagemain.py
@@ -3426,9 +3426,12 @@ class MyForm(QtGui.QMainWindow):
