Update of /cvsroot/tcladdressbook/Contribs/Tcl
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29474/Contribs/Tcl
Modified Files:
ABtoTclArrays.tcl
Log Message:
More informative header
Index: ABtoTclArrays.tcl
===================================================================
RCS file: /cvsroot/tcladdressbook/Contribs/Tcl/ABtoTclArrays.tcl,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- ABtoTclArrays.tcl 5 Jan 2004 13:27:00 -0000 1.1
+++ ABtoTclArrays.tcl 28 Jan 2004 09:20:57 -0000 1.2
@@ -6,7 +6,9 @@
# Description: export the records from the Address Book to Tcl arrays. This
# script creates a Tcl script file which can be sourced to create three
# arrays called respectively persons, parents and groups. The keys of these
-# arrays are the IDs of the records.
+# arrays are the IDs of the records. Note that, depending on the system
+# you work with, you might have to fconfigure the file encoding to an
+# appropriate value (see in the script below).
#
# This software is free software and distributed under the same licensing terms
# as the Tcl language itself. See license.terms in the Tcl distribution.
@@ -47,9 +49,12 @@
}
set fd [open addressbook.txt w]
+
+# -------------------------------------------------------------
# Here, configure the file stream to the appropriate encoding
# (iso8859-1, macRoman...)
fconfigure $fd -encoding macRoman
+# -------------------------------------------------------------
puts $fd "array set persons {"
foreach {n v} [array get persons] {
|