summaryrefslogtreecommitdiffstats
path: root/Lib/locale.py
Commit message (Collapse)AuthorAgeFilesLines
* Issue #8767: Restore building with --disable-unicode.Martin v. Löwis2012-05-201-1/+9
| | | | Original patch by Stefano Taschini.
* Update lingering references to ex-parrot. I mean ex-devguide.Éric Araujo2012-02-261-2/+1
|
* Issue #3067: Enhance the documentation and docstring of locale.setlocale()Petri Lehtinen2011-11-051-2/+3
|
* Closes #13283: removal of two unused variable in locale.pyJesus Cea2011-10-311-2/+0
|
* The simplest possible fix for the regression in bug 12752 by encoding unicodesBarry Warsaw2011-08-151-0/+2
| | | | to 8-bit strings.
* Issue #1813: Fix codec lookup and setting/getting locales under Turkish locales.Antoine Pitrou2011-07-241-1/+8
|
* Revert d370d609d09b as requested by Terry Jan Reedy:Victor Stinner2011-06-201-1/+1
| | | | "#3067: locale.setlocale() accepts a Unicode locale."
* Close #3067: locale.setlocale() accepts a Unicode locale.Victor Stinner2011-06-201-1/+1
|
* (backport)Fix #10154 and #10090: locale normalizes the UTF-8 encoding to ↵Ronald Oussoren2011-05-171-1/+1
| | | | | | | | "UTF-8" instead of "UTF8" On MacOSX and OpenBSD (and possibly other BSDs) "en_US.UTF-8" is a valid locale while "en_US.UTF8" is not. As the former works on Linux as well it is better to normalize to that value.
* Issue #6656: fix locale.format_string to handle escaped percents and mappings.R. David Murray2010-04-261-14/+22
| | | | | | Refactors format_string. Includes tests for the two problems noted in the issue, but as far as I can see there are no other tests that confirm that format_string conforms to normal % formatting rules.
* Issue #8374: Update the internal alias table in the :mod:`locale` moduleAntoine Pitrou2010-04-111-13/+89
| | | | to cover recent locale changes and additions.
* Issue #6620: Slightly safer code for _grouping_intervals in the localeMark Dickinson2009-08-041-0/+3
| | | | | module. Fixes a 'possible use before assignment' warning from pylint. Thanks Vincent Legoll.
* backport r73268Benjamin Peterson2009-06-071-3/+1
|
* Update the Windows locale mapping with the ones introduced with Vista.Jeroen Ruigrok van der Werven2009-05-081-13/+44
|
* Add ISO-8859-16.Jeroen Ruigrok van der Werven2009-05-081-0/+1
|
* Be more explicit about the error we are catching.Jeroen Ruigrok van der Werven2009-05-061-1/+1
| | | | Requested by: Antoine Pitrou
* Wrap getpreferredencoding()'s use of setlocale in a try/except to preventJeroen Ruigrok van der Werven2009-05-061-1/+4
| | | | | | us from raising an exception when the locale is invalid. Issue #1443504
* Fix issue 2522. locale.format now checks that it is passedR. David Murray2009-04-011-8/+15
| | | | | exactly one pattern, which avoids mysterious errors where it had seemed to fail to do localization.
* Attempt to fix Solaris buildbot failure on test_localeAntoine Pitrou2009-03-181-1/+1
|
* Issue #1222: locale.format() bug when the thousands separator is a space ↵Antoine Pitrou2009-03-141-32/+51
| | | | character.
* convert test_locale to unittest, and add a mechanism to override localconv() ↵Antoine Pitrou2008-07-251-0/+16
| | | | results for further testing (#1864, #1222)
* Update the locale module alias table.Marc-André Lemburg2008-05-301-19/+160
| | | | Closes #3011.
* Patch #1710352: add missing public functions to locale.__all__.Georg Brandl2007-05-011-3/+5
|
* Whitespace normalization.Tim Peters2006-05-181-1/+1
|
* Patch #1180296: improve locale string formatting functionsGeorg Brandl2006-05-171-44/+126
|
* Whitespace normalization.Tim Peters2006-01-201-1/+1
|
* Readd bug report note.Georg Brandl2006-01-201-0/+6
|
* Bug #1371247: Update Windows LCIDs in locale.py.Georg Brandl2006-01-201-32/+179
|
* - Patch #1166948: locale.py: Prefer LC_ALL, LC_CTYPE and LANG over LANGUAGEMatthias Klose2005-09-201-1/+3
| | | | | | | to get the correct encoding. - Patch #1166938: locale.py: Parse LANGUAGE as a colon separated list of languages.
* 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 ;)