Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2010-08-14
23:49 • Closed ticket [2819611fff]: Use Microsoft Layer for Unicode for win95/98/ME supp... artifact: bdfe7661a4 user: nijtmans
23:49 • Ticket [2819611fff]: 4 changes artifact: 3f680aaf48 user: nijtmans
2010-08-05
04:48 • Ticket [2819611fff]: 4 changes artifact: b099ccf12f user: hobbs
2009-08-21
03:07 • Ticket [2819611fff]: 4 changes artifact: 4d5169dcd7 user: hobbs
2009-08-16
17:40 • Ticket [2819611fff]: 4 changes artifact: 3f822e13ad user: nijtmans
17:27 • Add attachment patch.txt to ticket [2819611fff] artifact: f33e072fef user: nijtmans
17:27 • Ticket [2819611fff] Use Microsoft Layer for Unicode for win95/98/ME support ... artifact: 88a8dc98bb user: nijtmans
2009-07-10
13:45 • New ticket [2819611fff]. artifact: 9f1b218e38 user: nijtmans

Use Microsoft Layer for Unicode for win95/98/ME support

Closed / Wont Fix2819611fffffffffffffffffffffffffffffffffCreated 17 years agoUpdated 16 years ago
Descriptionplain2009-07-10 13:45:20
As of now, Tcl uses its own solution to maintain a single
binary which works on all Windows versions, and still
be fully unicode-aware if the platform is >=Win-NT
However, recently, Microsoft developed MSLU,
which provides a 'standard' solution for the same
problem. See:
    <http://msdn.microsoft.com/en-us/goglobal/bb688166.aspx>

Using this, would have prevented bugs like #2806622, and
would free the Tcl developers from maintaining our own
solution: the whole current machinery can simply be
removed, and everything compiled in unicode-mode, and
still it will work on Win95/98/ME.

I can only see one disadvantage: starpacks will stop
functioning on Win95/98/ME (unless Unicows.dll is
available on the system somewhere). Apart from
that, I only see advantages. We still can continue
to support Win95/98/ME, by only putting a single
extra dll in the binary distribution. All the places
using tclWinProcs->useWide (21 in total) can be
simplified.
nijtmansplain2009-08-16 17:27:31
File Added - 339357: patch.txt
nijtmansplain2009-08-16 17:40:55
Adds implementation, which allows to compile Tcl in two ways: without mslu support and with mslu support. Without mslu, everything is as before.
But when unicows.lib is available (detected in the configure script), then an
additional runtime check is done whether we are running on <WinNT and if
unicows.dll is available. If so, then the "unicode" encoding is used internally and unicows.dll is loaded to perform all necessary conversions.

This way doesn't have any disadvantage: everything still works unchanged
on Win95/98/ME, but there is a single potential incompatibility: The
function Tcl_WinUtfToTChar currently always uses the system encoding
when running on Win95/98/ME, but with this change it might start to
use the "unicode" encoding in stead. Code which depend on that
(like Tk!) will have to be adapted, but the modification is trivial.

I hope that this change could be accepted for Tcl 8.6, I don't think
a TIP is needed for that. But someone with

This patch will only work after compat/mslu/unicows.dll is
checked in, but this file is redistributable so that doesn't
cause any legal problems. The file unicows.lib is - unfortunately -
not redistributable, but it is available from any newer Microsoft SDK.

Any feedback is welcome.
hobbsplain2009-08-21 03:07:39
I support moving the head (even 8.5) to only mslu-based.  We agreed to this already, but noone had the time to do the streamlining you appear to have done.  There is no reason to maintain a Win9x-based support path for the latest stable releases.
hobbsplain2010-08-05 04:48:15
Just an fyi that 8.6 now panics if you even try to run it on Win9x, so perhaps we focus 8.6 on just re-writing all the non-unicode to force unicode only on Windows.
nijtmansplain2010-08-14 23:49:11
No reason for this any more
nijtmansplain2010-08-14 23:49:12
allow_comments - 1
Log in (anonymous is fine) to add a comment.

Attachments: