-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 10/05/2013 01:13 PM, Jim Fulton wrote:
> On Sat, Oct 5, 2013 at 1:47 AM, Chao Meng <bobom...@gmail.com> wrote:
>> Hi there,
>> 
>> Here is an issue from zopefoundation/ZODB github three months ago. I
>> am facing similar issue now and don't know how to resolve.
>> 
>> github issue link: https://github.com/zopefoundation/ZODB/issues/12
>> 
>> When I use Pyramid+ZODB+traversal and use some Chinese characters in
>> URL. Note that my resource tree saved in ZODB with unicode fine for
>> the Chinese characters as object names.
>> 
>> Basically when save transaction, ZODB.FileStorage.format TxnHeader
>> uses request.path_info as it's descr, which is unicode, but
>> TxnHeader cannot handle Unicode :(
>> 
>> It would be great if anyone can help or give some pointers.
> 
> This is a Pyramid bug.
> 
> transaction.note is defined to take a bytes string.  Pyramid should
> encode the path before passing it to transaction.note.

The interfaces says "text".  I realize that this is likely for
"hysterical raisins", but if we mean "bytes", we should say so.

Note that the implementation's use of an unadorned string literal to join
the values means that in Py3k, it really *is* text, and not bytes.  If we
want the application to do the encoding, then we should change that
literal as well.

> Alternatively, Pyramid could store the path in transaction extended
> info, which accepts any picklable type.
> 
> Of course, we could revisit this.  If we did, I'd deprecate the 
> transaction user and description attributes and only support meta data
> via the extended info mechanism, which I'd rename "meta data".




Tres.
- -- 
===================================================================
Tres Seaver          +1 540-429-0999          tsea...@palladion.com
Palladion Software   "Excellence by Design"    http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iEYEARECAAYFAlJS2g0ACgkQ+gerLs4ltQ5WEwCfdRPMCIrR5GdVaiPgLiBJT7QT
9wIAoLQzqhB9HRWYYIjsAx77+9A0dngc
=PFfZ
-----END PGP SIGNATURE-----

_______________________________________________
For more information about ZODB, see http://zodb.org/

ZODB-Dev mailing list  -  ZODB-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zodb-dev

Reply via email to