Skip to content
Tcl Source Code Changes To Migrating scripts to Tcl 9
Login

Changes To Migrating scripts to Tcl 9

Changes to "Migrating scripts to Tcl 9" between 2023-10-31 16:15:42 and 2023-10-31 16:36:20

︙
91
92
93
94
95
96
97
98

99




100





101
102
103
104
105
106
107
91
92
93
94
95
96
97

98
99
100
101
102
103

104
105
106
107
108
109
110
111
112
113
114
115







-
+

+
+
+
+
-
+
+
+
+
+








In addition, Tcl 9 does not restrict the names to ASCII. In practice
this should not have any compatibility issues.


See [TIP 595](https://core.tcl-lang.org/tips/doc/trunk/tip/595.md).

## Encoding for `source` command defaults to UTF-8
## Default encoding for scripts is UTF-8

The default encoding used when reading scripts, either with the `source`
command without an explicit `-encoding` option, or passed as a command
line argument to `tclsh` is utf-8 in Tcl 9 instead of the system
encoding as in Tcl 8.
TBD

No changes are required for scripts that were pure ASCII and used
the `\u` or \U` escapes for non-ASCII characters. Scripts that were
saved using a (non-utf8) system encoding will have to be modified
or sourced using an explicit `-encoding` option.

See [TIP 587](https://core.tcl-lang.org/tips/doc/trunk/tip/587.md).

## Full Unicode support

TBD - change in behavior of string length etc. for surrogate pairs

︙
137
138
139
140
141
142
143
144



145
146
147
148
149
150
151
145
146
147
148
149
150
151

152
153
154
155
156
157
158
159
160
161







-
+
+
+








* Replace `trace vinfo` with `trace info variable`

See [TIP 673](https://core.tcl-lang.org/tips/doc/trunk/tip/673.md).

## Removal of `tcl_precision`

TBD
The long deprecated variable `tcl_precision` that controlled conversion
of floating point numbers to strings has been removed. Use the `format`
command instead to control number of digits generated.

See [TIP 488](https://core.tcl-lang.org/tips/doc/trunk/tip/488.md).

## zipfs related

TBD - build modes, auto_path changes, cannot use auto_path to install
packages etc.