diff options
author | dgp <dgp@noemail.net> | 2003-09-05 21:52:10 (GMT) |
---|---|---|
committer | dgp <dgp@noemail.net> | 2003-09-05 21:52:10 (GMT) |
commit | 462a99209c5b3c9c736bca693fbfd99715fca370 (patch) | |
tree | d3430b36c25b01800aa40d815fadb9629ef33770 /doc/source.n | |
parent | 2a1e8b9aed653fa1addbcc006769e3e3347e0dd1 (diff) | |
download | tcl-462a99209c5b3c9c736bca693fbfd99715fca370.zip tcl-462a99209c5b3c9c736bca693fbfd99715fca370.tar.gz tcl-462a99209c5b3c9c736bca693fbfd99715fca370.tar.bz2 |
* doc/FileSystem.3: Implementation of
* doc/source.n: TIPs 137/151. Adds
* doc/tclsh.1: a -encoding option to
* generic/tcl.decls: the [source] command
* generic/tclCmdMZ.c (Tcl_SourceObjCmd): and a new C routine,
* generic/tclIOUtil.c (Tcl_FSEvalFileEx): Tcl_FSEvalFileEx(),
* generic/tclMain.c (Tcl_Main): that provides C access
* mac/tclMacResource.c (Tcl_MacSourceObjCmd): to the same function.
* tests/cmdMZ.test: Also adds command line
* tests/main.test: option handling in Tcl_Main() so that tclsh
* tests/source.test: and other apps built on Tcl_Main() respect
a -encoding command line option before a script filename. Docs and
tests updated as well. [Patch 742683]
This is a ***POTENTIAL INCOMPATIBILITY*** only for those C programs
that embed Tcl, build on Tcl_Main(), and make use of Tcl_Main's former
ability to pass a leading "-encoding" option to interactive shell
operations.
* generic/tclInt.decls: Added internal stub
* generic/tclMain.c (Tcl*StartupScript*): table entries for
two new functions Tcl_SetStartupScript() and Tcl_GetStartupScript()
that set/get the path and encoding for the startup script to be
evaluated by either Tcl_Main() or Tk_Main(). Given public names in
anticipation of their exposure by a followup TIP.
* generic/tclDecls.h: make genstubs
* generic/tclIntDecls.h:
* generic/tclStubInit.c:
FossilOrigin-Name: 8f0e879bbdc4e2ab4f52f86e0fb90d1455447e7b
Diffstat (limited to 'doc/source.n')
-rw-r--r-- | doc/source.n | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/doc/source.n b/doc/source.n index 7276a9c..ffc04ab 100644 --- a/doc/source.n +++ b/doc/source.n @@ -6,7 +6,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: source.n,v 1.5 2000/09/07 14:27:51 poenitz Exp $ +'\" RCS: @(#) $Id: source.n,v 1.6 2003/09/05 21:52:11 dgp Exp $ '\" .so man.macros .TH source n "" Tcl "Tcl Built-In Commands" @@ -17,6 +17,10 @@ source \- Evaluate a file or resource as a Tcl script .SH SYNOPSIS \fBsource \fIfileName\fR .sp +.VS 8.5 +\fBsource\fR \fB\-encoding \fIencodingName fileName\fR +.VE 8.5 +.sp \fBsource\fR \fB\-rsrc \fIresourceName \fR?\fIfileName\fR? .sp \fBsource\fR \fB\-rsrcid \fIresourceId \fR?\fIfileName\fR? @@ -33,7 +37,6 @@ If a \fBreturn\fR command is invoked from within the script then the remainder of the file will be skipped and the \fBsource\fR command will return normally with the result from the \fBreturn\fR command. .PP -.VS 8.4 The end-of-file character for files is '\\32' (^Z) for all platforms. The source command will read files up to this character. This restriction does not exist for the \fBread\fR or \fBgets\fR commands, @@ -41,7 +44,12 @@ allowing for files containing code and data segments (scripted documents). If you require a ``^Z'' in code for string comparison, you can use ``\\032'' or ``\\u001a'', which will be safely substituted by the Tcl interpreter into ``^Z''. -.VE 8.4 +.PP +.VS 8.5 +The \fB-encoding\fR option is used to specify the encoding of +the data stored in \fIfileName\fR. When the \fB-encoding\fR option +is omitted, the system encoding is assumed. +.VE 8.5 .PP The \fI\-rsrc\fR and \fI\-rsrcid\fR forms of this command are only available on Macintosh computers. These versions of the command @@ -52,7 +60,7 @@ application and any loaded C extensions. Alternatively, you may specify the \fIfileName\fR where the \fBTEXT\fR resource can be found. .SH "SEE ALSO" -file(n), cd(n) +file(n), cd(n), encoding(n) .SH KEYWORDS file, script |