# HG changeset patch # User cmlenz # Date 1189010002 0 # Node ID f05baef78d35df50a44e1fa1fd65d7ced20ab5d3 # Parent 709410bfd67c8a59ca9a001f68e1fd4f7fc541eb Ported [307] to 0.9.x branch. diff --git a/ChangeLog b/ChangeLog --- a/ChangeLog +++ b/ChangeLog @@ -7,6 +7,7 @@ `ngettext`, or vice versa. * Fixed time formatting for 12 am and 12 pm. * Fixed output encoding of the `pybabel --list-locales` command. + * PO files are now written in binary mode on windows (ticket #61). Version 0.9 diff --git a/babel/messages/frontend.py b/babel/messages/frontend.py --- a/babel/messages/frontend.py +++ b/babel/messages/frontend.py @@ -162,7 +162,7 @@ log.info('compiling catalog %r to %r', po_file, mo_file) - outfile = open(mo_file, 'w') + outfile = open(mo_file, 'wb') try: write_mo(outfile, catalog, use_fuzzy=self.use_fuzzy) finally: @@ -752,7 +752,7 @@ self.log.info('compiling catalog %r to %r', po_file, mo_file) - outfile = open(mo_file, 'w') + outfile = open(mo_file, 'wb') try: write_mo(outfile, catalog, use_fuzzy=options.use_fuzzy) finally: