On 10-03-2015 00:56, Chris Angelico wrote:
> On Tue, Mar 10, 2015 at 11:45 AM, Paulo da Silva
> <p_s_d_a_s_i_l_v_a...@netcabo.pt> wrote:
>> Hi!
>>
...

> Read the entire file in binary mode, and figure out which parts are
> text and how they're encoded (possibly ASCII or UTF-8). Then take just
> those snippets, and decode them. Something like this:
> 
> data = open("some_file", "rb")
> text_part = data[2718:3142]
> decoded_text = text_part.decode("utf-8")
> 
> That'll give you a usable Unicode string, assuming you have your
> offsets and encoding correct.
> 

Thanks Chris. Please read my response to Dave.


-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to