Boost logo

Boost :

From: Ben Artin (macdev_at_[hidden])
Date: 2005-12-16 19:34:17


My C++ code uses std::string as storage for UTF-8 strings. I am exporting some
of my C++ APIs to Python using Boost.Python, and I would like to somehow
Boost.Python about the fact that my strings are UTF-8 strings. Ideally, this
would mean that Boost.Python would convert my std::strings to Python unicode
objects on the way from C++ to Python, and that any Python unicode objects
passed into my C++ library would be converted to UTF-8 encoded std::strings.

What's the best way to go about doing this?

Thanks,

Ben

-- 
If this message helped you, consider buying an item
from my wish list: <http://artins.org/ben/wishlist>
I changed my name: <http://periodic-kingdom.org/People/NameChange.php>

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk