Unicode yet again

Ah unicode, squelch it in one place, it comes up in another. Now I find I've got a problem reading in the text file that contains an accented character. It works fine in the Wing IDE. But when I build the standalone app with py2app, it chokes in the following way. After I open the file ('f'), if I use this
             self.WholeText.DisplayText(f.read())
the file is displayed up to the line containing the accent, then nothing. If I use this:
             defaultEncoding = wx.GetDefaultPyEncoding()
             data = f.read()
             self.WholeText.DisplayText(unicode(data, defaultEncoding))
then *nothing* is displayed. As I say, it works in the IDE. Because of that difference, I don't even know where to look for the problem. What do I still not understand?

Charles Hartman