Message191151
The MO file format specification[0] reads:
"A program seeing an unexpected major revision number should stop reading the MO file entirely"
But Python doesn't pay attention to versions at all.
As a test-case I attached a MO file with a bogus major revision number. msgunfmt correcly rejects such a file:
$ msgunfmt messages.mo
msgunfmt: file "messages.mo" is not in GNU .mo format
Yet Python opens it happily:
>>> import gettext
>>> t = gettext.GNUTranslations(open("messages.mo", "rb"))
>>> t.gettext("foo")
'bar'
[0] http://www.gnu.org/software/gettext/manual/html_node/MO-Files.html |
|
Date |
User |
Action |
Args |
2013-06-14 20:34:41 | jwilk | set | recipients:
+ jwilk |
2013-06-14 20:34:41 | jwilk | set | messageid: <1371242081.43.0.507366610452.issue18216@psf.upfronthosting.co.za> |
2013-06-14 20:34:41 | jwilk | link | issue18216 messages |
2013-06-14 20:34:41 | jwilk | create | |
|