diff options
author | Ludovic Courtès <ludo@gnu.org> | 2011-01-24 21:44:44 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2011-01-24 21:44:44 +0100 |
commit | eda06220952cc93e35711ede68ec800144aaf288 (patch) | |
tree | 86f4342aa4ae248bae91a389ba4d0bc193973076 /doc/ref/api-evaluation.texi | |
parent | bc03d89fa20f3a84743be87a6ad8fb5b08701c93 (diff) | |
download | guile-eda06220952cc93e35711ede68ec800144aaf288.tar.gz |
Choose the input source file encoding in a locale-independent way.
This is so that compiling the same code on environments with different
locale settings yields the same result.
* module/system/base/compile.scm (compile-file): When ENC if #f, default
to "UTF-8" instead of `(fluid-ref %default-port-encoding)'.
* doc/ref/api-evaluation.texi (Compilation): Document the default output
file name and default source file encoding for `compile-file' and
`guile-tools compile'.
Diffstat (limited to 'doc/ref/api-evaluation.texi')
-rw-r--r-- | doc/ref/api-evaluation.texi | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/doc/ref/api-evaluation.texi b/doc/ref/api-evaluation.texi index e20bad429..0a85ec98b 100644 --- a/doc/ref/api-evaluation.texi +++ b/doc/ref/api-evaluation.texi @@ -567,8 +567,9 @@ Add @var{dir} to the front of the module load path. @item -o @var{ofile} @itemx --output=@var{ofile} -Write output bytecode to @var{ofile}. By convention, bytecode file names end -in @code{.go}. +Write output bytecode to @var{ofile}. By convention, bytecode file +names end in @code{.go}. When @option{-o} is omitted, the output file +name is as for @code{compile-file} (see below). @item -W @var{warning} @itemx --warn=@var{warning} @@ -589,6 +590,9 @@ Use @var{lang} as the target language of @var{file}. If this option is omitted, @end table +Each @var{file} is assumed to be UTF-8-encoded, unless it contains a +coding declaration as recognized by @code{file-encoding} +(@pxref{Character Encoding of Source Files}). @end deffn The compiler can also be invoked directly by Scheme code using the procedures @@ -608,6 +612,9 @@ Compile the file named @var{file}. Output will be written to a file in the current directory whose name is computed as @code{(compiled-file-name @var{file})}. + +As with @command{guile-tools compile}, @var{file} is assumed to be +UTF-8-encoded unless it contains a coding declaration. @end deffn @deffn {Scheme Procedure} compiled-file-name file |