Tcl/Tk 8.1b3 for Windows, Binary Distribution RCS: @(#) $Id: README.binary,v 1.2.2.7 1999/03/25 01:34:21 rjohnson Exp $ 1. Introduction --------------- This directory contains the binary distribution of Tcl/Tk 8.1b3 for Windows. It was compiled with Microsoft Visual C++ 5.0 using Win32 API, so that it will run under Windows NT and Windows 95. The information here corresponds to the second beta release of 8.1. 2. Documentation ---------------- The best way to get started with Tcl is to read one of the introductory books on Tcl: Practical Programming in Tcl and Tk, 2nd Edition, by Brent Welch, Prentice-Hall, 1997, ISBN 0-13-616830-2 Tcl and the Tk Toolkit, by John Ousterhout, Addison-Wesley, 1994, ISBN 0-201-63337-X Exploring Expect, by Don Libes, O'Reilly and Associates, 1995, ISBN 1-56592-090-2 Other books are listed at http://www.scriptics.com/resource/doc/books/ http://www.tclconsortium.org/resources/books.html There is also an official home for Tcl and Tk on the Web: http://www.scriptics.com These Web pages include information about the latest releases, products related to Tcl and Tk, reports on bug fixes and porting issues, HTML versions of the manual pages, and pointers to many other Tcl/Tk Web pages at other sites. Check them out! 3. Installation --------------- The binary release is distributed as a self-extracting archive called tcl81.exe. The setup program which will prompt you for an installation directory. It will create the installation heirarchy under the specified directory, and install a wish application icon under the program manager group of your choice. We are no longer supporting use of Tcl with 16-bit versions of Windows. Microsoft has completely dropped support of the Win32s subsystem. 4. Summary of changes in Tcl 8.1 -------------------------------- 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. Internationalization. Tcl has undergone a major revision to support international character sets: All strings in Tcl are now represented in UTF-8 instead of ASCII, so that Tcl now supports the full Unicode character set. The representation of ASCII characters is unchanged (in UTF-8 anything that looks like an ASCII character is an ASCII character), but characters with the high-order bit set, such as those in ISO-8859, are represented with multi-byte sequences, as are all Unicode characters with values greater than 127. This change does not affect Tcl scripts but it does affect C code that parses strings. Tcl automatically translates between UTF-8 and the normal encoding for the platform during interactions with the system. In Tcl scripts the backslash sequence \u can be used to enter 16-bit Unicode characters. \o and \x generate only 8-bit characters as before. The 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). There are several new C APIs that support UTF-8 and various encodings. See the manual entry 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. Binary data. Binary data is handled differently in Tcl 8.1 than in Tcl 8.0. Tcl 8.1 uses the UTF-8 facilities to represent binary data: the character value zero is represented with a multi-byte sequence, so that (once again) strings in Tcl 8.1 never contain null bytes. This means that binary data is now accepted everywhere in Tcl and Tk (in Tcl 8.0 the support for binary data was incomplete). If you have C code that needs to manipulate the bytes of binary data (as opposed to just passing the data through) you should use a new object type called "byte array". See the manual entry ByteArrObj.3 for information about procedures such as Tcl_GetByteArrayFromObj. New regular expressions. Tcl 8.1 contains a brand new implementation of regular expressions from Henry Spencer. This new version supports almost all of the Perl extensions and it also handles UTF-8 and binary data. Multi-Threading. Tcl 8.1 is multi-thread safe. Each thread can contain several Tcl interpreters, but a given interpreter can not be accessed from more than one thread. Each thread runs its own event loop, and you can post events to other threads. There is not yet support for tcl level use of threading except for a test command. (Compile tcltest and try testthread.) Tk 8.1 is not yet multi-thread safe, and may never be due to limitations of Xlib. What's new in Tk 8.1 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. 1. Internationalization. Tk has undergone a major overhaul to support the new internationalization features of Tcl. The font package has been rewritten to support arbitrary Unicode characters; when you specify a particular font such as "Times 12" Tk may actually use additional fonts to display Unicode characters that don't exist in the font you chose. Tk guarantees to find a way to display any Unicode character regardless of the font you selected, as long as there is some font in the system that contains the Unicode character. The input method support in Tk has also been modified to support full Unicode characters. 2. Send/DDE support. The 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. 3. Configuration options. There is a new library of C procedures for manipulating widget configuration options using Tcl_Objs 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. 4. More Tcl_Obj support. Several additional C library procedures have been added to support Tcl_Objs. See the manual entries 3DBorder.3, GetAnchor.3, GetBitmap.3, GetColor.3, GetCursor.3, GetFont.3, GetJustify.3, and GetPixels.3. Incompatibilities 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: The changes to the regular expression package required a few minor syntax changes in order to support all the new features: - Backslash inside brackets is an escape whereas before it was a literal character. To specify a literal \ in brackets you must write \\. - Some escapes, such as \d, \s, and \w, now mean special things in a bracket expression. Other escapes , such as \D, \S, \W, \A and \Z, are illegal. - A { 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. - Backslash followed by an alphanumeric character is either an escape or an error. Several of the new escapes were treated as literal characters in earlier versions of Tcl. - The matching order has changed slightly. Here is an explanation from Henry Spencer: 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. Known Problems With These Releases 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: - We haven't been able to test input methods in Tk under Unix to be sure that the full Unicode character set is being substituted properly in %A substitutions. This means that it probably doesn't work. We have been able to test under Windows and the Macintosh. - In Tk, PostScript generation does not work correctly for characters outside the ASCII subset. - The threading for Tcl is brand new so there are likely to be bugs, although it is based on early work done by Richard Hipp. We have done some testing on a multiprocessor Solaris machine, but none on Windows or other flavors of UNIX on a multiprocessor. 6. Known Bugs/Missing Features ------------------------------ - Clock command fails to handle daylight savings time boundaries for things like "last week". - Background processes aren't properly detached on NT. - File events only work on sockets and pipes. - Files/console/serial ports don't support nonblocking I/O. - There is no support for custom cursors/application icons. The core set of X cursors is supported, although you cannot change their color. - Stippling of arcs isn't implemented yet. - Some "wm" functions don't map to Windows and aren't implemented; others should map, but just aren't implemented. The worst offenders are the icon manipulation routines. - Color management on some displays doesn't work properly resulting in Tk switching to monochrome mode. - Tk seems to fail to draw anything on some Matrox Millenium cards. - Printing does not work for images (e.g. GIF) on a canvas. - Tk_dialog appears in the upper left corner. This is a symptom of a larger problem with "wm geometry" when applied to unmapped or iconified windows. - PPM images are using the wrong translation mode for writing to files, resulting in CR/LF terminated PPM files. - Tk crashes if the display depth changes while it is running. Tk also doesn't consistently track changes in the system colors. There may be more that we don't know about, so be sure to submit bug reports when you run into problems. If you have comments or bug reports for the Windows version of Tcl, please use our on-line bug form at: http://www.scriptics.com/support/bugForm.html or post them to the newsgroup comp.lang.tcl. 7. Tcl newsgroup ----------------- There is a network news group "comp.lang.tcl" intended for the exchange of information about Tcl, Tk, and related applications. Feel free to use the newsgroup both for general information questions and for bug reports. We read the newsgroup and will attempt to fix bugs and problems reported to it. When using comp.lang.tcl, please be sure that your e-mail return address is correctly set in your postings. This allows people to respond directly to you, rather than the entire newsgroup, for answers that are not of general interest. A bad e-mail return address may prevent you from getting answers to your questions. You may have to reconfigure your news reading software to ensure that it is supplying valid e-mail addresses. 8. Tcl contributed archive -------------------------- Many people have created exciting packages and applications based on Tcl and/or Tk and made them freely available to the Tcl community. An archive of these contributions is kept on the machine ftp.neosoft.com. You can access the archive using anonymous FTP; the Tcl contributed archive is in the directory "/pub/tcl". The archive also contains several FAQ ("frequently asked questions") documents that provide solutions to problems that are commonly encountered by TCL newcomers. 9. Tcl Resource Center ---------------------- Visit http://www.scritics.com/resource/ to see an annotated index of many Tcl resources available on the World Wide Web. This includes papers, books, and FAQs, as well as extensions, applications, binary releases, and patches. You can contribute patches by sending them to . You can also recommend more URLs for the resource center using the forms labeled "Add a Resource". 10. Mailing lists ---------------- A couple of Mailing List have been set up to discuss Macintosh or Windows related Tcl issues. In order to use these Mailing Lists you must have access to the internet. To subscribe send a message to: wintcl-request@tclconsortium.org mactcl-request@tclconsortium.org In the body of the message (the subject will be ignored) put: subscribe mactcl Joe Blow Replacing Joe Blow with your real name, of course. (Use wintcl instead of mactcl if your interested in the Windows list.) If you would just like to receive more information about the list without subscribing put the line: information mactcl in the body instead (or wintcl). 11. Tcl version numbers ---------------------- Each Tcl release is identified by two numbers separated by a dot, e.g. 6.7 or 7.0. If a new release contains changes that are likely to break existing C code or Tcl scripts then the major release number increments and the minor number resets to zero: 6.0, 7.0, etc. If a new release contains only bug fixes and compatible changes, then the minor number increments without changing the major number, e.g. 7.1, 7.2, etc. If you have C code or Tcl scripts that work with release X.Y, then they should also work with any release X.Z as long as Z > Y. Alpha and beta releases have an additional suffix of the form b1 or b1. For example, Tcl 7.0b1 is the first beta release of Tcl version 7.0, Tcl 7.0b2 is the second beta release, and so on. A beta release is an initial version of a new release, used to fix bugs and bad features before declaring the release stable. An alpha release is like a beta release, except it's likely to need even more work before it's "ready for prime time". New releases are normally preceded by one or more alpha and beta releases. We hope that lots of people will try out the alpha and beta releases and report problems. We'll make new alpha/beta releases to fix the problems, until eventually there is a beta release that appears to be stable. Once this occurs we'll make the final release. We can't promise to maintain compatibility among alpha and beta releases. For example, release 7.1b2 may not be backward compatible with 7.1b1, even though the final 7.1 release will be backward compatible with 7.0. This allows us to change new features as we find problems during beta testing. We'll try to minimize incompatibilities between beta releases, but if a major problem turns up then we'll fix it even if it introduces an incompatibility. Once the official release is made then there won't be any more incompatibilities until the next release with a new major version number. Patch releases have a suffix such as p1 or p2. These releases contain bug fixes only. A patch release (e.g Tcl 7.6p2) should be completely compatible with the base release from which it is derived (e.g. Tcl 7.6), and you should normally use the highest available patch release. As of 8.0.3, the patch releases use a second . instead of 'p'. So, the 8.0 release went to 8.0p1, 8.0p2, and 8.0.3. The alphas and betas will still use the 'a' and 'b' letters in their tcl_patchLevel. 12. Linking against the binary release -------------------------------------- In order to link your applications against the .dll files shipped with this release, you will need to use the appropriate .lib file for your compiler. In the lib directory of the installation directory, there are library files for the Microsoft Visual C++ compiler: tcl81.lib tk81.lib 13. Building dynamically loadable extensions -------------------------------------------- Please refer to the example dynamically loadable extension provided on our ftp site: ftp://ftp.scriptics.com/pub/tcl/misc/example.zip This archive contains a template that you can use for building extensions that will be loadable on Unix, Windows, and Macintosh systems.