David M. Cotter wrote:
> Steven wrote:
>> I see you are using Python 2
> correct
>
>>It's hard to say what *exactly* is happening here, because you don't explain 
>>how the python print statement somehow gets into your C++ Log code. Do I 
>>guess right that it catches stdout?
> yes, i'm redirecting stdout to my own custom print class, and then from that 
> function i call into my embedded C++ print function
>

I don't know much about embedding Python, but each file object has an
encoding property.

Why not examine   sys.stdout.encoding ?  And change it to "UTF-8" ?

print "encoding is", sys.stdout.encoding

sys.stdout.encoding = "UTF-8"

-- 
DaveA



-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to