summaryrefslogtreecommitdiffstats
path: root/Lib/locale.py
Commit message (Collapse)AuthorAgeFilesLines
* SF patch #1051395: locale.getdefaultlocale does not return tuple in some OSRaymond Hettinger2005-01-011-1/+1
| | | | (Contributed by Jiwon Seo.)
* Correct mapping of Python codec name to C encoding name for UTF-8 (the C libMarc-André Lemburg2004-12-131-104/+1
| | | | | | doesn't seem to like "UTF-8"). Removed the UTF-8 aliases since these should be available for all locales.
* locale.py now uses an updated locale alias table (built usingMarc-André Lemburg2004-12-101-219/+871
| | | | | | | | | Tools/i18n/makelocalealias.py, a tool to parse the X11 locale alias file); the encoding lookup was enhanced to use Python's encoding alias table As sige-effect, this fixes SF bug [ 1080864 ] locale.py doesn't recognize valid locale setting.
* Patch #962487: Don't crash for empty locale names.Martin v. Löwis2004-07-261-1/+1
|
* atof: correct parameter nameSkip Montanaro2004-04-101-3/+3
|
* Replace sequential split/join calls on strings with a single replace call.Brett Cannon2004-03-231-5/+3
| | | | Thanks Andrew Gaul.
* Support '' as the argument for the setlocale emulation. Fixes #678259.Martin v. Löwis2003-03-301-1/+1
|
* Whitespace normalization.Tim Peters2002-11-091-2/+2
|
* This stopped working on Windows, due to a reference to the non-existentTim Peters2002-11-051-1/+1
| | | | | | _locale.getdefaultlocale. Guessing a leading underscore was intended, but don't really understood this stuff (locale looks like Spanish for the opposite of global to me <wink>).
* Add getpreferredencoding. Support @euro modifiers. Fixes #554676.Martin v. Löwis2002-11-031-0/+41
| | | | The @euro part is backported to 2.2.3.
* point people to the Python bug tracker, rather than to a mailFredrik Lundh2002-10-191-4/+7
| | | | account I hardly ever use...
* eliminate unqualified except when checking for presence of LC_MESSAGESSkip Montanaro2002-03-251-1/+1
| | | | see bug 411881
* Remove some dead code (PyChecker)Andrew M. Kuchling2001-08-131-3/+1
|
* Implement Mark Favas's suggestion. There's a clear bug in _group():Guido van Rossum2001-04-161-1/+1
| | | | | | | | | | its first return statement returns a single value while its caller always expects it to return a tuple of two items. Fix this by returning (s, 0) instead. This won't make the locale test on Irix succeed, but now it will fail because of a bug in the platform's en_US locale rather than because of a bug in the locale module.
* Patch #415777: new grouping strategy.Martin v. Löwis2001-04-131-10/+30
| | | | | | | | | fixes bug #414940, and redoes the fix for #129417 in a different way. It also fixes a number of other problems with locale-specific formatting: If there is leading or trailing spaces, then no grouping should be applied in the spaces, and the total length of the string should not be changed due to grouping. Also added test case which works only if the en_US locale is available.
* setlocale(): In _locale-missing compatibility function, stringBarry Warsaw2001-03-231-2/+1
| | | | comparison should be done with != instead of "is not".
* String method conversion.Eric S. Raymond2001-02-091-12/+12
|
* test___all__ was failing on WIndows because locale.py doesn't reallyTim Peters2001-01-241-3/+10
| | | | | know which names it exports. Didn't fix its ignorance, but patched over the consequence.
* a few more modules get __all__Skip Montanaro2001-01-241-0/+5
|
* In format(), consider sign only after grouping.Martin v. Löwis2001-01-211-4/+9
| | | | Suggested by Kevin Jacobs in bug report #129417.
* Spelling fixes supplied by Rob W. W. Hooft. All these are fixes in eitherThomas Wouters2000-07-161-1/+1
| | | | | | | | | | 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 ;)
* -- removed get_default compatibility kludgeFredrik Lundh2000-07-101-2/+3
| | | | -- added a few extra comments to locale.py
* - repaired locale.py for non-windows platforms. the try/exceptFredrik Lundh2000-07-091-2/+5
| | | | | checked for the wrong exception. my fault. sorry. (first reported by Alex Coventry)
* - merged setlocale and set_locale. the internal setlocaleFredrik Lundh2000-07-091-92/+159
| | | | | | | | | | | | | | | | | | function is overridden by a python version which accepts *either* a string (old behaviour) or a locale tuple. - renamed a few methods (for consistency): get_locale => getlocale get_default_locale => getdefaultlocale set_to_default => resetlocale (!) - the _locale implementation module can now implement an optional _getdefaultlocale function. if that function isn't available, a POSIX-based approach is used (checking LANG and other environment variables, as usual). (patch #100765)
* typos fixed by Rob HooftJeremy Hylton2000-06-281-2/+2
|
* Marc-Andre Lemburg <mal@lemburg.com>:Marc-André Lemburg2000-06-081-3/+61
| | | | | | Added emulations of the C APIs in _locale to be used when the _locale module is not enabled. They return the correct values assuming the 'C' locale.
* Marc-Andre Lemburg <mal@lemburg.com>:Marc-André Lemburg2000-06-071-11/+505
| | | | | | Added a new locale name aliasing engine which also supports locale encodings, a feature which is used by the new default encoding support in site.py.
* Actually, the previous batch's comment should have been different;Guido van Rossum2000-02-041-1/+2
| | | | | | | | | | *this* set of patches is Ka-Ping's final sweep: The attached patches update the standard library so that all modules have docstrings beginning with one-line summaries. A new docstring was added to formatter. The docstring for os.py was updated to mention nt, os2, ce in addition to posix, dos, mac.
* Mass check-in after untabifying all files that need it.Guido van Rossum1998-03-261-18/+18
|
* Add Martin von Loewis as the author of this module.Guido van Rossum1997-11-191-0/+1
|
* User-level locale module. A wrapper around _locale which addsGuido van Rossum1997-11-191-0/+75
format(), str(), atof(), and atoi(). The last three are locale sensitive versions of the corresponding standard functions (only for numbers though); format() does general %[efg] formatting taking the locale into account, optionally with thousands grouping.