summaryrefslogtreecommitdiff
path: root/Python/codecs.c
Commit message (Collapse)AuthorAgeFilesLines
* Issue #24993: Handle import error in namereplace error handlerVictor Stinner2015-09-031-7/+5
| | | | | Handle PyCapsule_Import() failure (exception) in PyCodec_NameReplaceErrors(): return immedialty NULL.
* Issue #24115: Update uses of PyObject_IsTrue(), PyObject_Not(),Serhiy Storchaka2015-05-301-14/+185
|\ | | | | | | | | PyObject_IsInstance(), PyObject_RichCompareBool() and _PyDict_Contains() to check for and handle errors correctly.
| * Issue #24102: Fixed exception type checking in standard error handlers.Serhiy Storchaka2015-05-181-27/+21
| |\
| * | Issue #23450: Fixed possible integer overflows.Serhiy Storchaka2015-02-161-1/+1
| | |
| * | Issue #22286: The "backslashreplace" error handlers now works withSerhiy Storchaka2015-01-251-53/+91
| | | | | | | | | | | | decoding and translating.
| * | correct assertionBenjamin Peterson2014-11-261-1/+1
| | |
| * | fix variable nameBenjamin Peterson2014-11-261-1/+1
| | |
| * | Issue #19676: Fixed integer overflow issue in "namereplace" error handler.Serhiy Storchaka2014-11-261-5/+11
| | |
| * | Issue #19676: Added the "namereplace" error handler.Serhiy Storchaka2014-11-251-0/+108
| | |
| * | Issue #22518: Fixed integer overflow issues in "backslashreplace",Serhiy Storchaka2014-10-041-4/+23
| |\ \ | | | | | | | | | | | | "xmlcharrefreplace", and "surrogatepass" error handlers.
| | * \ Fixed reference leak in the "backslashreplace" error handler.Serhiy Storchaka2014-09-231-4/+23
| | |\ \
| | | * \ Merge fix for issue #22166 from 3.4Nick Coghlan2014-09-151-4/+23
| | | |\ \
| | | | * | Issue #13916: Fix surrogatepass error handler on WindowsVictor Stinner2014-05-161-0/+4
| | | | | |
| | | | * | Issue #13916: Disallowed the surrogatepass error handler for non UTF-*Serhiy Storchaka2014-05-151-4/+19
| | | | | | | | | | | | | | | | | | | | | | | | encodings.
* | | | | | Issue #24115: Update uses of PyObject_IsTrue(), PyObject_Not(),Serhiy Storchaka2015-05-301-5/+6
| |_|_|_|/ |/| | | | | | | | | | | | | | | | | | | PyObject_IsInstance(), PyObject_RichCompareBool() and _PyDict_Contains() to check for and handle errors correctly.
* | | | | Issue #24102: Fixed exception type checking in standard error handlers.Serhiy Storchaka2015-05-181-24/+18
|/ / / /
* | | | Issue #22518: Fixed integer overflow issues in "backslashreplace",Serhiy Storchaka2014-10-041-2/+8
|/ / / | | | | | | | | | "xmlcharrefreplace", and "surrogatepass" error handlers.
* | | Fixed reference leak in the "backslashreplace" error handler.Serhiy Storchaka2014-09-231-1/+3
|/ /
* | Issue #22166: clear codec caches in test_codecsNick Coghlan2014-09-151-0/+26
|/
* Close #20404: blacklist non-text encodings in io.TextIOWrapperNick Coghlan2014-02-041-21/+63
| | | | | | | | | - io.TextIOWrapper (and hence the open() builtin) now use the internal codec marking system added for issue #19619 - also tweaked the C code to only look up the encoding once, rather than multiple times - the existing output type checks remain in place to deal with unmarked third party codecs.
* Issue #19619: Blacklist non-text codecs in method APINick Coghlan2013-11-221-16/+122
| | | | | | | | | | str.encode, bytes.decode and bytearray.decode now use an internal API to throw LookupError for known non-text encodings, rather than attempting the encoding or decoding operation and then throwing a TypeError for an unexpected output type. The latter mechanism remains in place for third party non-text encodings.
* Issue #12892: The utf-16* and utf-32* codecs now reject (lone) surrogates.Serhiy Storchaka2013-11-191-17/+146
| | | | | | | | | | The utf-16* and utf-32* encoders no longer allow surrogate code points (U+D800-U+DFFF) to be encoded. The utf-32* decoders no longer decode byte sequences that correspond to surrogate code points. The surrogatepass error handler now works with the utf-16* and utf-32* codecs. Based on patches by Victor Stinner and Kang-Hao (Kenny) Lu.
* Close 19609: narrow scope of codec exc chainingNick Coghlan2013-11-151-4/+6
|
* Close #17828: better handling of codec errorsNick Coghlan2013-11-131-0/+18
| | | | | | | | - output type errors now redirect users to the type-neutral convenience functions in the codecs module - stateless errors that occur during encoding and decoding will now be automatically wrapped in exceptions that give the name of the codec involved
* Issue #1772673: The type of `char*` arguments now changed to `const char*`.Serhiy Storchaka2013-10-191-2/+2
|
* Issue #18722: Remove uses of the "register" keyword in C code.Antoine Pitrou2013-08-131-2/+2
|
* Issue #18408: normalizestring() now raises MemoryError on memory allocation ↵Victor Stinner2013-07-121-1/+1
| | | | failure
* Issue #15422: get rid of PyCFunction_New macroAndrew Svetlov2012-12-251-1/+1
|
* #16336: merge with 3.3.Ezio Melotti2012-11-031-4/+4
|\
| * #16336: merge with 3.2.Ezio Melotti2012-11-031-4/+4
| |\
| | * #16336: fix input checking in the surrogatepass error handler. Patch by ↵Ezio Melotti2012-11-031-4/+4
| | | | | | | | | | | | Serhiy Storchaka.
* | | Issue #16330: Use surrogate-related macrosVictor Stinner2012-10-301-2/+2
|/ / | | | | | | Patch written by Serhiy Storchaka.
* | merge with 3.2Philip Jenvey2012-10-261-3/+4
|\ \ | |/
| * bounds check for bad data (thanks amaury)Philip Jenvey2012-10-261-3/+4
| |
* | Check newly created consistency using _PyUnicode_CheckConsistency(str, 1)Victor Stinner2012-04-271-4/+6
| | | | | | | | | | | | * In debug mode, fill the string data with invalid characters * Simplify also reference counting in PyCodec_BackslashReplaceErrors() and PyCodec_XMLCharRefReplaceError()
* | Issue #13722: Avoid silencing ImportErrors when initializing the codecs ↵Antoine Pitrou2012-01-181-9/+0
|\ \ | |/ | | | | registry.
| * Issue #13722: Avoid silencing ImportErrors when initializing the codecs ↵Antoine Pitrou2012-01-181-9/+0
| | | | | | | | registry.
* | PyCodec_IgnoreErrors() avoids the deprecated "u#" formatVictor Stinner2011-12-011-2/+1
| |
* | Avoid the Py_UNICODE type in codecs.cVictor Stinner2011-11-041-4/+11
| |
* | PyCodec_XMLCharRefReplaceError(): Remove unused variableVictor Stinner2011-11-041-2/+2
| |
* | Fix C89 incompatibility.Martin v. Löwis2011-11-041-1/+1
| |
* | Port error handlers from Py_UNICODE indexing to code point indexing.Martin v. Löwis2011-11-041-77/+46
| |
* | Rename _Py_identifier to _Py_IDENTIFIER.Martin v. Löwis2011-10-141-2/+2
| |
* | Issue #13088: Add shared Py_hexdigits constant to format a number into base 16Victor Stinner2011-10-141-12/+12
| |
* | Use identifier API for PyObject_GetAttrString.Martin v. Löwis2011-10-101-2/+4
| |
* | PyCodec_ReplaceErrors() uses "C" format instead of "u#" to build resultVictor Stinner2011-10-021-2/+3
| |
* | Use the new Py_ARRAY_LENGTH macroVictor Stinner2011-09-291-1/+1
| |
* | Implement PEP 393.Martin v. Löwis2011-09-281-24/+20
|/
* Issue #1813: Fix codec lookup under Turkish locales.Antoine Pitrou2011-07-241-1/+1
|
* Merged revisions 84655 via svnmerge fromAntoine Pitrou2010-09-091-6/+20
| | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r84655 | antoine.pitrou | 2010-09-09 22:30:23 +0200 (jeu., 09 sept. 2010) | 6 lines Issue #9804: ascii() now always represents unicode surrogate pairs as a single `\UXXXXXXXX`, regardless of whether the character is printable or not. Also, the "backslashreplace" error handler now joins surrogate pairs into a single character on UCS-2 builds. ........