diff options
author | Ludovic Courtès <ludo@gnu.org> | 2009-11-14 16:14:20 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2009-11-14 16:59:25 +0100 |
commit | d6a6989e08a84cbf3c6b11c199536f665cbb6b50 (patch) | |
tree | b444cbd57da811480c67d02125c5ae1e69ddecd1 /doc/ref/api-io.texi | |
parent | c2be4e891c8cc085c4eb3f68125c95d86fae856c (diff) | |
download | guile-d6a6989e08a84cbf3c6b11c199536f665cbb6b50.tar.gz |
Replace `setbinary' by a public `%default-port-encoding' fluid.
* doc/ref/api-evaluation.texi (Character Encoding of Source Files): Add
reference to the "Ports" node.
* doc/ref/api-io.texi (Ports): Document `%default-port-encoding'.
* libguile/ports.c (scm_port_encoding_var): Rename to...
(default_port_encoding_var): ... this; update callers. Make `static'.
* libguile/posix.c (scm_setbinary): Remove.
* libguile/posix.h: Adjust accordingly.
* test-suite/tests/numbers.test: Remove unneeded `setbinary' call.
* test-suite/tests/ports.test: Replace `setbinary' call by equivalent
`%default-port-encoding' mutation and `set-port-encoding!' calls.
* test-suite/tests/r6rs-ports.test: Replace `setbinary' call by
equivalent `%default-port-encoding' mutation.
Diffstat (limited to 'doc/ref/api-io.texi')
-rw-r--r-- | doc/ref/api-io.texi | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/doc/ref/api-io.texi b/doc/ref/api-io.texi index 83a2fd79c..a5ffa2319 100644 --- a/doc/ref/api-io.texi +++ b/doc/ref/api-io.texi @@ -111,6 +111,12 @@ Sets the character encoding that will be used to interpret all port I/O. @var{enc} is a string containing the name of an encoding. @end deffn +@defvr {Scheme Variable} %default-port-encoding +A fluid containing containing @code{#f} or the name of the encoding to +be used by default for newly created ports (@pxref{Fluids and Dynamic +States}). The value @code{#f} is equivalent to @code{"ISO-8859-1"}. +@end defvr + New ports are created with the encoding appropriate for the current locale if @code{setlocale} has been called or ISO-8859-1 otherwise, and this procedure can be used to modify that encoding. |