[rfc] bencode unicode strings
Aaron Bentley
aaron at aaronbentley.com
Tue Jun 16 15:09:21 BST 2009
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Alexander Belchenko wrote:
> See my explanations above: I have unicode strings everywhere in Qt and I
> need to store some of these strings in config files (e.g. qbzr.conf,
> branch.conf or tree.conf). Configobj requires me to provide an unicode
> strings to store
No, Configobj can work in bytestring or unicode modes.
>, so I have to do double conversion here:
If you're storing them in config files, you should generally store
human-readable values. ConfigObj supports dict of (dicts of) unicode
strings-- isn't that sufficient?
> 1) Convert my unicode strings to utf-8
> 2) Bencode them
> 3) Convert bencoded result from utf-8 to unicode
I think this may be invalid.
Aaron.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAko3p44ACgkQ0F+nu1YWqI0TTwCfQyXlT+lg/cpa+NEPWcVatl+z
ikoAn2KcADegtov1aaIYrB3Z9ZnTVRJ9
=a4Ts
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list