Thanks Alex and Margin ! And I have one question. How do you know the encoding of a file ? Is it specific to the application which generated the file? > I recommend to use codecs.open. You'll need to specify the encoding, > e.g. > > s = codecs.open("unicode_filename",encoding="ucs-2").read() >