New submission from Geoffrey Bache <gjb1...@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@python
components: Documentation
messages: 144677
nosy: docs@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 <rep...@bugs.python.org>
<http://bugs.python.org/issue13074>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to