The most important changes in Tcl 8.1 are summarized below. See
the README
and changes
files in the distribution
for more complete information on what has changed, including both feature
changes and bug fixes.
\u
can be used to enter
16-bit Unicode characters. \o
and \x
generate
only 8-bit characters as before.
fconfigure
command now supports a -encoding
option for specifying the encoding of an open file or socket. Tcl will
automatically translate between the specified encoding and UTF-8 during
I/O. See the directory library/encoding to find out what encodings are
supported (eventually there will be an encoding
command
that makes this information more accessible).
Utf.3
for procedures that
translate between Unicode and UTF-8 and manipulate UTF-8 strings.
See Encoding.3
for procedures that create new encodings and
translate between encodings. See ToUpper.3
for procedures
that perform case conversions on UTF-8 strings.
ByteArrObj.3
for information about procedures such as
Tcl_GetByteArrayFromObj
.
The most important changes in Tk 8.1 are summarized below. See the
README
and changes
files in the distribution
for more complete information on what has changed, including both feature
changes and bug fixes.
send
command now works on Windows platforms. It is implemented using DDE
and there is a new dde
command that allows Tk
applications to use DDE to communicate with other Windows applications.
send
still doesn't work on the Macintosh.
Tcl_Obj
s instead of strings. This should eventually make
Tk much more efficient. Label, button, checkbutton, radiobutton, and
menu widgets have been modified to use the new library. See
SetOptions.3
for information on the new C APIs.
Tcl_Obj
support. Several additional C
library procedures have been added to support Tcl_Obj
s.
See the manual entries 3DBorder.3
, GetAnchor.3
,
GetBitmap.3
, GetColor.3
, GetCursor.3
,
GetFont.3
, GetJustify.3
, and
GetPixels.3
.
Although the 8.1 releases involve substantial changes to the implementation of Tcl and Tk, the changes should introduce few if any compatibility problems for Tcl scripts or extensions. Here are the compatibility problems that we know of:
\
in brackets
you must write \\
.
\d
, \s
, and
\w
, now mean special things in a bracket expression.
Other escapes , such as \D
, \S
,
\W
, \A
and \Z
, are illegal.
{
followed by a digit will no longer match those
two characters. Instead, it will start a bound. Such sequences
should be rare and will often result in an error because the
following characters will not look like a valid bound.
Both the old package and the new package find the match that starts earliest in the string. Where things get tricky is when there is more than one possible match starting at that point, different in either length or internal details (that is, which subexpressions match where).
The old package examines possible matches in a complex but well-defined order, and simply reports the first one it finds. The new package examines all possible matches simultaneously, and reports the longest. For example, (week|wee)(night|knights) matches all of "weeknights".
When two possible matches are of the same length, priority is decided based on getting the longest possible matches for early subexpressions, with later subexpressions accepting whatever they can get. This means that either (wee|week)(kly|ly) or (week*)(k?ly) matches "weekly" as week-ly, not wee-kly. More subtly, when .*|a.c matches "abc", the .* matches the whole string and the a.c doesn't even get a chance to participate.
When non-greedy quantifiers are used, things get more complicated. If all quantifiers in a regular expression are non-greedy, the exact same rules apply except with "longest" replaced by "shortest" everywhere. When greedy and non-greedy quantifiers are mixed, it's complicated and difficult to explain.
Tcl_EvalObj
has a new argument
flags
, and the procedure Tcl_GlobalEvalObj
has been removed (Tcl_EvalObj
now provides all of its
functionality).
Tcl_ObjSetVar2
and
Tcl_ObjGetVar2
have been renamed Tcl_SetObjVar2
and Tcl_GetObjVar2
for consistency with other C APIs;
the name arguments have been changed from objects to strings.
Both the internationalization support and the new regular expression package are large, complicated, and young, which means there are likely to be lots of bugs. We need your help in finding and fixing problems. This is particularly important for internationalization, since we don't have the right equipment or knowledge to test under very many conditions. Here are some of the most glaring bugs or missing features that we know of:
scan
command, the %c
conversion
character doesn't properly handle characters with Unicode value greater
than 255 (i.e., those outside the ISO-8859-1 subset).
%A
substitutions. This means that it probably doesn't
work. We have been able to test under Windows and the Macintosh.
Taken and pruned from file at
http://sunscript.sun.com/TclTkCore/8.1.html
Last modified: Fri Jan 23 1998, 09:13