[C++-sig] Working with python unicode strings without wstring

Markus Heller markus at relix.de
Mon Jul 31 19:33:51 CEST 2006

Dear all,

Rodrigue Cloutier asked a question about working with Python Unicode strings 
in C++, back in May 2006. He didn't receive an answer then (at lease it seems 
to me). 

Now I have a similar question: I have generated Unicode strings within my 
Python application and I'd like to process them in the C++ wrapper. I am 
importing the strings with 

Content = PyString_AsString(PyContainer);

Unfortunately, whenever the Python string contains a German Umlaut (äöü) the 
C++ application fails with an error. The variable "Content" is defined as an 
STL  std::string. 

How can I proceed?

Thanks for your advice. 


More information about the Cplusplus-sig mailing list