Re: [Zope-dev] SVN: zope.app.locales/trunk/ In version 3.7.2 msgids and default values where forced to be unicodes. This
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 05/14/2012 08:13 AM, Michael Howitz wrote:
Log message for revision 125861: In version 3.7.2 msgids and default values where forced to be unicodes. This was too strict because at least the TAL extractor returns UTF-8 encoded default values. Fixed this by allowing the default value to be a string again.
<snip>
--- zope.app.locales/trunk/src/zope/app/locales/extract.py 2012-05-14 08:50:08 UTC (rev 125860) +++ zope.app.locales/trunk/src/zope/app/locales/extract.py 2012-05-14 12:13:47 UTC (rev 125861) @@ -97,7 +97,7 @@ msgstr "" <BLANKLINE>
- Unicode can be used in msgids and default values + Unicode can be used in msgids and default values:
entry = POTEntry(Message(u"\u263B", default=u"\u253A")) entry.write(FakeFile()) @@ -106,6 +106,16 @@ msgstr "" <BLANKLINE>
+ But msgid might be an ascii encoded string and `default` might be a + string with the DEFAULT_ENCODING, too: + + >>> entry = POTEntry(Message("Oe", default="\xd6")) + >>> entry.write(FakeFile()) + #. Default: "\326" + msgid "Oe" + msgstr "" + <BLANKLINE> + """
Hmm, I'm running into a test failure where the Message constructor blows up with a decode error for the 'default' value here. Does that ring any bells for anyone? I know we can't be depending on a sys.setdefaultencoding hack. Tres. - -- =================================================================== Tres Seaver +1 540-429-0999 tseaver@palladion.com Palladion Software "Excellence by Design" http://palladion.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk/t6b4ACgkQ+gerLs4ltQ4OAwCeK2Cm+Xm/OLy+adZGfOkQx/hk CakAoLQFXbtqQU9Jlm1ZfgtD58RwJ7wE =kFK2 -----END PGP SIGNATURE-----
Am 29.06.2012 um 19:45 schrieb Tres Seaver: […]
Hmm, I'm running into a test failure where the Message constructor blows up with a decode error for the 'default' value here. Does that ring any bells for anyone? I know we can't be depending on a sys.setdefaultencoding hack.
Sorry for the delayed response. I ran the tests of zope.app.locales with Python 2.5, 2.6 and 2.7. I did not get any errors. Which Pyhton version did you use? What does the traceback look like? Yours sincerely, -- Michael Howitz · mh@gocept.com · software developer gocept gmbh & co. kg · Forsterstraße 29 · 06112 Halle (Saale) · Germany http://gocept.com · Tel +49 345 1229889-8 Python, Pyramid, Plone, Zope · consulting, development, hosting, operations
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 07/03/2012 05:07 AM, Michael Howitz wrote:
Am 29.06.2012 um 19:45 schrieb Tres Seaver: […]
Hmm, I'm running into a test failure where the Message constructor blows up with a decode error for the 'default' value here. Does that ring any bells for anyone? I know we can't be depending on a sys.setdefaultencoding hack.
Sorry for the delayed response. I ran the tests of zope.app.locales with Python 2.5, 2.6 and 2.7. I did not get any errors.
Which Pyhton version did you use? What does the traceback look like?
Thanks for checking back. I cleared away the environment and rebuilt, and the issue went away. I'm planning to pretend it never happened. :) Tres. - -- =================================================================== Tres Seaver +1 540-429-0999 tseaver@palladion.com Palladion Software "Excellence by Design" http://palladion.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk/yua8ACgkQ+gerLs4ltQ5FpgCg3MOTIimTGPCbluE52NQBRs2W yCcAn0QIFCy3gFbZq8yZdu+6ZFAICLSI =RgN1 -----END PGP SIGNATURE-----
participants (2)
-
Michael Howitz -
Tres Seaver