From d1c1e10f70212464415fdf2ab0bed4b5d32fdf32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Walter=20D=C3=B6rwald?= Date: Thu, 6 Oct 2005 20:29:57 +0000 Subject: Part of SF patch #1313939: Speedup charmap decoding by extending PyUnicode_DecodeCharmap() the accept a unicode string as the mapping argument which is used as a mapping table. This code isn't used by any of the codecs yet. --- Doc/api/concrete.tex | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'Doc/api') diff --git a/Doc/api/concrete.tex b/Doc/api/concrete.tex index b6dbc5d6c8..53c3b67760 100644 --- a/Doc/api/concrete.tex +++ b/Doc/api/concrete.tex @@ -1322,7 +1322,12 @@ points. const char *errors} Create a Unicode object by decoding \var{size} bytes of the encoded string \var{s} using the given \var{mapping} object. Return - \NULL{} if an exception was raised by the codec. + \NULL{} if an exception was raised by the codec. If \var{mapping} is \NULL{} + latin-1 decoding will be done. Else it can be a dictionary mapping byte or a + unicode string, which is treated as a lookup table. Byte values greater + that the length of the string and U+FFFE "characters" are treated as + "undefined mapping". + \versionchanged[Allowed unicode string as mapping argument]{2.4} \end{cfuncdesc} \begin{cfuncdesc}{PyObject*}{PyUnicode_EncodeCharmap}{const Py_UNICODE *s, -- cgit v1.2.1