cjprecord / editra-plugins

Automatically exported from code.google.com/p/editra-plugins
0 stars 0 forks source link

[CommentBrowser] UnicodeEncodeError #40

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Got this while opening a BOM utf-8 text file today, noting error here for now.

*** Wed Feb 27 06:04:01 2008 ***
Traceback (most recent call last):
  File "/Users/cody/Desktop/devel/wxPy3rdParty/Editra/src/util.py", line 181, in OnData
    self._data['fcallb'](files)
  File "/Users/cody/Desktop/devel/wxPy3rdParty/Editra/src/ed_pages.py", line 432, in OnDrop
    self.OpenPage(pathname, the_file)
  File "/Users/cody/Desktop/devel/wxPy3rdParty/Editra/src/ed_pages.py", line 322, in OpenPage
    ed_msg.PostMessage(ed_msg.EDMSG_FILE_OPENED, self.control.GetFileName())
  File "/Users/cody/Desktop/devel/wxPy3rdParty/Editra/src/ed_msg.py", line 139, in 
PostMessage
    Publisher().sendMessage(msgtype, msgdata)
  File "/Users/cody/Desktop/devel/wxPy3rdParty/Editra/src/extern/pubsub.py", line 796, in 
sendMessage
    self.__topicTree.sendMessage(aTopic, message, onTopicNeverCreated)
  File "/Users/cody/Desktop/devel/wxPy3rdParty/Editra/src/extern/pubsub.py", line 483, in 
sendMessage
    deliveryCount += node.sendMessage(message)
  File "/Users/cody/Desktop/devel/wxPy3rdParty/Editra/src/extern/pubsub.py", line 321, in 
sendMessage
    listener(message)
  File "build/bdist.macosx-10.3-fat/egg/commentbrowser/cbrowser.py", line 360, in 
OnListUpdate
    self.UpdateCurrent()
  File "build/bdist.macosx-10.3-fat/egg/commentbrowser/cbrowser.py", line 277, in 
UpdateCurrent
    str(descr),
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe8' in position 3: 
ordinal not in 
range(128)

Original issue reported on code.google.com by CodyPrec...@gmail.com on 27 Feb 2008 at 12:07

GoogleCodeExporter commented 9 years ago
Checked in some fixes in r458.

This was caused by trying to convert the unicode from the buffer to string. The 
conversions where unnecessary 
and removing them solved the issue.

cody

Original comment by CodyPrec...@gmail.com on 28 Feb 2008 at 10:14

GoogleCodeExporter commented 9 years ago
Move old 'fixed' issues to verified

Original comment by CodyPrec...@gmail.com on 3 Feb 2009 at 8:18