diff --git a/src/history_window.py b/src/history_window.py
index ec85fa10299baff06beac97a41bcf0ee72b8c1bf..45d6f68c69c1ec41687191fc17a93bae6bc61b4a 100644
--- a/src/history_window.py
+++ b/src/history_window.py
@@ -155,7 +155,7 @@ class HistoryWindow:
 		self.window.destroy()
 
 	def on_jid_entry_activate(self, widget):
-		self.jid = self.jid_entry.get_text()
+		self.jid = self.jid_entry.get_text().decode('utf-8')
 		
 		if self.completion_dict.has_key(self.jid): # a full qualified jid or a contact name was entered
 			contact = self.completion_dict[self.jid]