A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2008-August/081631.html below:

[Python-Dev] 3.0 C API to decode bytes into unicode?

[Python-Dev] 3.0 C API to decode bytes into unicode? [Python-Dev] 3.0 C API to decode bytes into unicode?Amaury Forgeot d'Arc amauryfa at gmail.com
Fri Aug 1 15:38:58 CEST 2008
Benjamin Peterson wrote:
> On Fri, Aug 1, 2008 at 8:06 AM, Barry Scott <barry at barrys-emacs.org> wrote:
>> I cannot see how I implement decode() for bytes objects using the C API
>> for PyCXX library,
>>
>> I'd assuming that I should find a PyBytes_Decode function but cannot find it
>> in beta 2.
>>
>> What is the preferred way to do this?
>
> PyObject_CallMethod(bytesobj, "decode", "")
>
> PyUnicode_FromEncodedObject takes an encoding argument.

There is also PyCodec_Decode() but it does not seem to be documented,
nor is any function declared in codecs.h.
Is it part of the public API?

-- 
Amaury Forgeot d'Arc
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4