gettext crazy question

ulysses ulysses_dm at yahoo.com.cn
Sun Nov 23 08:27:55 EST 2003


martin at v.loewis.de (Martin v. Löwis) wrote in message news:<m3k75svbpz.fsf at mira.informatik.hu-berlin.de>...
> ulysses_dm at yahoo.com.cn (ulysses) writes:
> 
> > So I debug gettext module. I find following interest question.
> > -=gettext line 154=-
> >   buf = fp.read()
> > 
> > I sure fp(file object) has open.
> > 
> > It can't read all binary code.  buf 's lengh smaller than real file.
> > exp ,whole file 1000 byte. gettext only read 187 .  
> 
> It looks like the file is opened in text mode, not in binary mode.
> 
> Did you, by chance, open the file yourself? You should use binary
> mode, then.
> 
> Regards,
> Martin


I use same statement open file. different is MO file.
when don't fill some line, gettext can open mo normally.




More information about the Python-list mailing list