summaryrefslogtreecommitdiffstats
path: root/Lib/encodings/__init__.py
Commit message (Collapse)AuthorAgeFilesLines
* Merge part of the trunk changes into the p3yk branch. This merges from 43030Thomas Wouters2006-04-211-11/+20
| | | | | | | | | | | | (branch-creation time) up to 43067. 43068 and 43069 contain a little swapping action between re.py and sre.py, and this mightily confuses svn merge, so later changes are going in separately. This merge should break no additional tests. The last-merged revision is going in a 'last_merge' property on '.' (the branch directory.) Arbitrarily chosen, really; if there's a BCP for this, I couldn't find it, but we can easily change it afterwards ;)
* Checkpoint. 218 tests are okay; 53 are failing. Done so far:Guido van Rossum2006-03-151-1/+2
| | | | | | | | - all classes are new-style (but ripping out classobject.[ch] isn't done) - int/int -> float - all exceptions must derive from BaseException - absolute import - 'as' and 'with' are keywords
* Fix the encodings package codec search function to only searchMarc-André Lemburg2006-02-191-1/+1
| | | | | | inside its own package. Fixes problem reported in patch #1433198. Add codec search function for codec test codec.
* No need to import exceptions, they are builtinsNeal Norwitz2005-09-011-3/+2
|
* Let the default encodings search function lookup aliases before trying the ↵Marc-André Lemburg2004-01-201-18/+26
| | | | codec import. This allows applications to install codecs which override (non-special-cased) builtin codecs.
* Remove usage of re module from encodings package search function.Marc-André Lemburg2003-05-161-4/+19
|
* Whitespace normalization.Tim Peters2003-04-241-1/+0
|
* Revert Patch #670715: iconv support.Martin v. Löwis2003-04-031-5/+0
|
* Handle iconv initialization erorrsNeal Norwitz2003-02-281-1/+1
|
* Patch #670715: Universal Unicode Codec for POSIX iconv.Martin v. Löwis2003-01-261-0/+6
|
* Whitespace normalization.Tim Peters2002-12-241-1/+1
|
* When looking for an alias, first look for the normalized name (whichGuido van Rossum2002-10-041-1/+3
| | | | | still may contain dots), then if that doesn't exist look for the name with dots replaced by underscores. This is a little more forgiving.
* Extending the encoding name normalization to handle more non-alphanumericMarc-André Lemburg2002-10-041-8/+20
| | | | characters.
* Whitespace normalization.Tim Peters2002-08-081-3/+3
|
* Revert #571603 since it is ok to import codecs that are not subdirectoriesMartin v. Löwis2002-07-291-9/+12
| | | | of encodings. Skip modules that don't have a getregentry function.
* Patch #571603: Refer to encodings package explicitly.Martin v. Löwis2002-07-281-1/+1
|
* Corrected import behaviour for codecs which live outside the encodingsMarc-André Lemburg2002-02-111-12/+7
| | | | package.
* Add IANA character set aliases to the encodings alias dictionaryMarc-André Lemburg2002-02-101-7/+27
| | | | | | | and make alias lookup lazy. Note that only those IANA character set aliases were added for which we actually have codecs in the encodings package.
* Fixed search function error reporting in the encodings packageMarc-André Lemburg2001-09-191-7/+11
| | | | | | | | __init__.py module to raise errors which can be catched as LookupErrors as well as SystemErrors. Modified the error messages to include more information about the failing module.
* Changed .getaliases() support to register the new aliases in theMarc-André Lemburg2000-12-121-4/+12
| | | | | | | | | | | encodings package aliases mapping dictionary rather than in the internal cache used by the search function. This enables aliases to take advantage of the full normalization process applied to encoding names which was previously not available. The patch restricts alias registration to new aliases. Existing aliases cannot be overridden anymore.
* Marc-Andre Lemburg <mal@lemburg.com>:Marc-André Lemburg2000-06-131-2/+2
| | | | | Removed import of string module -- use string methods directly. Thanks to Finn Bock.
* Marc-Andre's third try at this bulk patch seems to work (except thatGuido van Rossum2000-04-051-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | his copy of test_contains.py seems to be broken -- the lines he deleted were already absent). Checkin messages: New Unicode support for int(), float(), complex() and long(). - new APIs PyInt_FromUnicode() and PyLong_FromUnicode() - added support for Unicode to PyFloat_FromString() - new encoding API PyUnicode_EncodeDecimal() which converts Unicode to a decimal char* string (used in the above new APIs) - shortcuts for calls like int(<int object>) and float(<float obj>) - tests for all of the above Unicode compares and contains checks: - comparing Unicode and non-string types now works; TypeErrors are masked, all other errors such as ValueError during Unicode coercion are passed through (note that PyUnicode_Compare does not implement the masking -- PyObject_Compare does this) - contains now works for non-string types too; TypeErrors are masked and 0 returned; all other errors are passed through Better testing support for the standard codecs. Misc minor enhancements, such as an alias dbcs for the mbcs codec. Changes: - PyLong_FromString() now applies the same error checks as does PyInt_FromString(): trailing garbage is reported as error and not longer silently ignored. The only characters which may be trailing the digits are 'L' and 'l' -- these are still silently ignored. - string.ato?() now directly interface to int(), long() and float(). The error strings are now a little different, but the type still remains the same. These functions are now ready to get declared obsolete ;-) - PyNumber_Int() now also does a check for embedded NULL chars in the input string; PyNumber_Long() already did this (and still does) Followed by: Looks like I've gone a step too far there... (and test_contains.py seem to have a bug too). I've changed back to reporting all errors in PyUnicode_Contains() and added a few more test cases to test_contains.py (plus corrected the join() NameError).
* On 17-Mar-2000, Marc-Andre Lemburg said:Barry Warsaw2000-03-201-3/+3
| | | | | | | | | | | | | Attached you find an update of the Unicode implementation. The patch is against the current CVS version. I would appreciate if someone with CVS checkin permissions could check the changes in. The patch contains all bugs and patches sent this week and also fixes a leak in the codecs code and a bug in the free list code for Unicode objects (which only shows up when compiling Python with Py_DEBUG; thanks to MarkH for spotting this one).
* Marc-Andre Lemburg: Unicode encodings.Guido van Rossum2000-03-101-0/+78