[docs] [issue13074] Improve documentation of locale encoding functions

Geoffrey Bache report at bugs.python.org
Fri Sep 30 10:15:34 CEST 2011


New submission from Geoffrey Bache <gjb1002 at users.sourceforge.net>:

The locale module provides locale.getdefaultlocale and locale.getpreferredencoding. The encodings returned by each are generally subtly different ('ISO8859-1' vs 'ISO-8859-1'), but the difference between these methods is not explained. 

A comment by Martin von Löwis from 2003 in http://bugs.python.org/issue813449 indicates that "getdefaultlocale should not be used in new code", if this is really the case then this should be in the docs. 

Anyone reading the docs from the top will currently encounter getdefaultlocale first and believe that this is the way to get the encoding.

----------
assignee: docs at python
components: Documentation
messages: 144677
nosy: docs at python, gjb1002
priority: normal
severity: normal
status: open
title: Improve documentation of locale encoding functions
versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue13074>
_______________________________________


More information about the docs mailing list