Re: base64 and unicode

2007-05-04 Thread Duncan Booth
EuGeNe Van den Bulke <[EMAIL PROTECTED]> wrote: > Duncan Booth wrote: >> However, the decoded text looks as though it is utf16 encoded so it >> should be written as binary. i.e. the output mode should be "wb". > > Thanks for the "wb" tip that works (see bellow). I guess it is > experience based

Re: base64 and unicode

2007-05-04 Thread EuGeNe Van den Bulke
Duncan Booth wrote: > However, the decoded text looks as though it is utf16 encoded so it should be > written as binary. i.e. > the output mode should be "wb". Thanks for the "wb" tip that works (see bellow). I guess it is experience based but how could you tell that it was utf16 encoded? > S

Re: base64 and unicode

2007-05-04 Thread Duncan Booth
EuGeNe Van den Bulke <[EMAIL PROTECTED]> wrote: > >>> import base64 > >>> base64.decode(file("hebrew.b64","r"),file("hebrew.lang","w")) > > It runs but the result is not correct: some of the lines in hebrew.lang > are correct but not all of them (hebrew.expected.lang is the correct > file). I g

base64 and unicode

2007-05-04 Thread EuGeNe Van den Bulke
Hi, I am trying to convert the file hebrew.b64 attached into hebrew.lang (text file usable by Inline Search for localization purposes. >>> import base64 >>> base64.decode(file("hebrew.b64","r"),file("hebrew.lang","w")) It runs but the result is not corre