157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
|
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
|
-
+
+
+
+
+
-
+
+
+
|
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.
No changes are required for scripts that were pure ASCII and used
the `\u` or \U` escapes for non-ASCII characters. Scripts that were
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
In Tcl 8, characters outside the BMP were stored as a surrogate pair
and effectively treated as a string of length 2. This is no longer
the case in Tcl 9 which has full support for the entire Unicode range
and will (correctly) treat these characters as strings of length 1.
TBD - change in behavior of string length etc. for surrogate pairs
Any workarounds to deal with these shortcomings in Tcl 8 need to be
removed.
See [TIP 497](https://core.tcl-lang.org/tips/doc/trunk/tip/497.md).
## Traces on upvars linked to arrays
In Tcl 8, traces set on an array would not fire when an element of the array
was modified through an `upvar` link. This documented but incongruent
|
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
|
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
|
-
+
|
specified pattern instead rasiing an error. This is true irrespective of
the presence of the `-nocomplain` option which is still accepted but has
no significance. Any scripts that expect an error to be raised in such
cases will need to be modified to check for an empty list instead.
See [TIP 637](https://core.tcl-lang.org/tips/doc/trunk/tip/637.md).
## Removal of depreciated commands or arguments
## Removal of deprecated commands or arguments
These commands or arguments have been deprecated and have been removed from Tcl 9.
Scripts making use of these should be modified as below:
* Replace `case` with `switch`
* Replace `read <chan> nonewline` with `read -nonewline <chan>`
* Replace `puts <chan> <line> nonewline` with `puts -nonewline <chan> <line>`
|