summaryrefslogtreecommitdiffstats
path: root/Lib/codecs.py
Commit message (Collapse)AuthorAgeFilesLines
* SF patch #998993: The UTF-8 and the UTF-16 stateful decoders now supportWalter Dörwald2004-09-071-43/+69
| | | | | | | | | | | decoding incomplete input (when the input stream is temporarily exhausted). codecs.StreamReader now implements buffering, which enables proper readline support for the UTF-16 decoders. codecs.StreamReader.read() has a new argument chars which specifies the number of characters to return. codecs.StreamReader.readline() and codecs.StreamReader.readlines() have a new argument keepends. Trailing "\n"s will be stripped from the lines if keepends is false. Added C APIs PyUnicode_DecodeUTF8Stateful and PyUnicode_DecodeUTF16Stateful.
* Ignore sizehint argument. Fixes SF #844561.Marc-André Lemburg2004-02-261-10/+4
|
* Fix typos.Walter Dörwald2003-02-021-4/+4
|
* sys was already imported, remove second importNeal Norwitz2002-12-301-2/+0
|
* Patch to make _codecs a builtin module. This is necessary sinceMarc-André Lemburg2002-12-121-5/+15
| | | | | | | Python 2.3 will support source code encodings which rely on the builtin codecs being available to the parser. Remove struct dependency from codecs.py
* Add missing documentation for the PEP 293 functionality toWalter Dörwald2002-11-191-7/+22
| | | | the codecs docstrings.
* Add next() and __iter__() methods to StreamReader, StreamReaderWriterWalter Dörwald2002-11-061-0/+27
| | | | | | and StreamRecoder. This closes SF bug #634246.
* PEP 293 implemention (from SF patch http://www.python.org/sf/432401)Walter Dörwald2002-09-021-1/+12
|
* Add constants BOM_UTF8, BOM_UTF16, BOM_UTF16_LE, BOM_UTF16_BE,Walter Dörwald2002-06-041-17/+32
| | | | | | | | | | BOM_UTF32, BOM_UTF32_LE and BOM_UTF32_BE that represent the Byte Order Mark in UTF-8, UTF-16 and UTF-32 encodings for little and big endian systems. The old names BOM32_* and BOM64_* were off by a factor of 2. This closes SF bug http://www.python.org/sf/555360
* SF 563203. Replaced 'has_key()' with 'in'.Raymond Hettinger2002-06-011-1/+1
|
* Set default value for readlines.sizehint to None. Change needed for 2.2.1Martin v. Löwis2002-03-051-1/+1
| | | | as well.
* Added new helpers for easy access to codecs. Docs will follow.Marc-André Lemburg2001-09-191-0/+42
|
* Fix typo in commentAndrew M. Kuchling2001-09-181-1/+1
|
* Patch #444359: Remove unused imports.Martin v. Löwis2001-08-021-1/+1
|
* Add dead imports of modules that are "magically" imported.Martin v. Löwis2001-07-311-0/+6
|
* Whitespace normalization.Tim Peters2001-05-291-1/+1
|
* Moved the encoding map building logic from the individual mappingMarc-André Lemburg2001-05-161-0/+21
| | | | | | codec files to codecs.py and added logic so that multi mappings in the decoding maps now result in mappings to None (undefined mapping) in the encoding maps.
* Just changed "x,y" to "x, y" everywhere (i.e., inserted horizontal spaceTim Peters2001-05-151-37/+34
| | | | after commas that didn't have any).
* added __all__ lists to a number of Python modulesSkip Montanaro2001-01-201-0/+3
| | | | | | | | added test script and expected output file as well this closes patch 103297. __all__ attributes will be added to other modules without first submitting a patch, just adding the necessary line to the test script to verify more-or-less correct implementation.
* Whitespace normalization.Tim Peters2001-01-141-7/+7
|
* This patch changes the default behaviour of the builtin charmapMarc-André Lemburg2001-01-031-0/+15
| | | | | | | | | | | | | | | | codec to not apply Latin-1 mappings for keys which are not found in the mapping dictionaries, but instead treat them as undefined mappings. The patch was originally written by Martin v. Loewis with some additional (cosmetic) changes and an updated test script by Marc-Andre Lemburg. The standard codecs were recreated from the most current files available at the Unicode.org site using the Tools/scripts/gencodec.py tool. This patch closes the bugs #116285 and #119960.
* (Patch #102698) Fix for a bug reported by Wade Leftwich:Andrew M. Kuchling2000-12-101-4/+4
| | | | StreamReader ignores the 'errors' parameter passed to its constructor
* Remove redundent information from a docstring.Fred Drake2000-10-021-3/+0
|
* Spelling fixes supplied by Rob W. W. Hooft. All these are fixes in eitherThomas Wouters2000-07-161-2/+2
| | | | | | | | | | comments, docstrings or error messages. I fixed two minor things in test_winreg.py ("didn't" -> "Didn't" and "Didnt" -> "Didn't"). There is a minor style issue involved: Guido seems to have preferred English grammar (behaviour, honour) in a couple places. This patch changes that to American, which is the more prominent style in the source. I prefer English myself, so if English is preferred, I'd be happy to supply a patch myself ;)
* Marc-Andre Lemburg <mal@lemburg.com>:Marc-André Lemburg2000-06-211-1/+6
| | | | Made codecs.open() default to 'rb' as file mode.
* Marc-Andre Lemburg:Guido van Rossum2000-05-011-2/+2
| | | | | The two methods .readline() and .readlines() in StreamReaderWriter didn't define the self argument. Found by Tom Emerson.
* M.-A. Lemburg <mal@lemburg.com>:Fred Drake2000-04-131-4/+40
| | | | Added more documentation. Clarified some existing comments.
* Deleted trailing whitespace. This is really a way to be able to addGuido van Rossum2000-04-111-14/+14
| | | | | | | | | a missing part of the previous checkin message: Marc-Andre Lemburg: Added encoding name attributes to wrapper classes which allow applications to check the used encoding names.
* Marc-Andre Lemburg:Guido van Rossum2000-04-111-23/+119
| | | | | Added .writelines(), .readlines() and .readline() to all codec classes.
* Marc-Andre Lemburg: Error reporting in the codec registry and lookupGuido van Rossum2000-03-311-1/+5
| | | | mechanism is enhanced to be more informative.
* Marc-Andre Lemburg:Guido van Rossum2000-03-241-1/+1
| | | | | | | | | | Attached you find the latest update of the Unicode implementation. The patch is against the current CVS version. It includes the fix I posted yesterday for the core dump problem in codecs.c (was introduced by my previous patch set -- sorry), adds more tests for the codecs and two new parser markers "es" and "es#".
* Oops, another in the same file; I should read the mail fully beforeFred Drake2000-03-171-1/+1
| | | | | | | checking in; sorry! "the the" --> "the" (in docstring); noted by Detlef Lannert <lannert@lannert.rz.uni-duesseldorf.de>.
* "intput" --> "input" (in docstring); noted by Detlef LannertFred Drake2000-03-171-1/+1
| | | | <lannert@lannert.rz.uni-duesseldorf.de>.
* Module codecs -- Python Codec Registry, API and helpers. Written byGuido van Rossum2000-03-101-0/+414
Marc-Andre Lemburg.