New submission from John Machin <sjmac...@users.sourceforge.net>:

Docs say """The default encoding is platform dependent""" but don't say
how to find out what that is, or how it is determined. On my Windows XP
SP3 setup, the default is cp1252, but the best/only guess at finding out
without actually opening a file involved sys.defaultencoding() which
produces 'utf-8'. I was pointed at locale.getpreferredencoding(), which
returns 'cp1252' on my machine.

Please add a sentence along these lines: The default encoding is
(obtained by calling|the same as) locale.getpreferredencoding(), not
sys.getdefaultencoding() -- corrected/amplified as necessary.

----------
assignee: georg.brandl
components: Documentation
messages: 80811
nosy: georg.brandl, sjmachin
severity: normal
status: open
title: built-in open(..., encoding=vague_default)
versions: Python 3.0, Python 3.1

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue5107>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to