diff Doc/lib/libstdtypes.tex @ 29065:bf1634b023d5 legacy-trunk

Patch #612627: Add encoding attribute to file objects, and determine the terminal encoding on Windows and Unix.
author Martin v. Löwis <martin@v.loewis.de>
date Sat, 10 May 2003 07:10:12 +0000
parents 06abfc9c68e7
children 04065c4a1c6b
line wrap: on
line diff
--- a/Doc/lib/libstdtypes.tex	Sat May 10 05:37:13 2003 +0000
+++ b/Doc/lib/libstdtypes.tex	Sat May 10 07:10:12 2003 +0000
@@ -1372,6 +1372,20 @@
 It may not be available on all file-like objects.
 \end{memberdesc}
 
+\begin{memberdesc}[file]{encoding}
+The encoding that this file uses. When Unicode strings are written
+to a file, they will be converted to byte strings using this encoding.
+In addition, when the file is connected to a terminal, the attribute
+gives the encoding that the terminal is likely to use (that 
+information might be incorrect if the user has misconfigured the 
+terminal). The attribute is read-only and may not be present on
+all file-like objects. It may also be \code{None}, in which case
+the file uses the system default encoding for converting Unicode
+strings.
+
+\versionadded{2.3}
+\end{memberdesc}
+
 \begin{memberdesc}[file]{mode}
 The I/O mode for the file.  If the file was created using the
 \function{open()} built-in function, this will be the value of the