[prev in list] [next in list] [prev in thread] [next in thread] 

List:       python-cpp-sig
Subject:    [C++-sig] Creating a unicode instrance from utf-8 encoded string
From:       Wichert Akkerman <wichert () wiggy ! net>
Date:       2011-02-21 10:36:52
Message-ID: 4D624044.70004 () wiggy ! net
[Download RAW message or body]

I'm trying to do something which should be very simple, but I'm not 
having much luck figuring out how from the existing documentation.

For a python 2 project I am trying to return a gettext-translated string 
as a unicode instance to python. The return value for gettext() is a 
UTF-8 encoded char*, which should be pretty simple to convert to a 
python unicode instrance using PyUnicode_FromString. I have a feeling 
this is trivial to do, but I can't seem to figure out how.

Wichert.

_______________________________________________
Cplusplus-sig mailing list
Cplusplus-sig@python.org
http://mail.python.org/mailman/listinfo/cplusplus-sig
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic