summaryrefslogtreecommitdiffstats
path: root/win/tclWinInit.c
diff options
context:
space:
mode:
authorhobbs <hobbs>2004-04-07 22:04:19 (GMT)
committerhobbs <hobbs>2004-04-07 22:04:19 (GMT)
commit9c4ceb163fd879f11fc0c03f0b20f8b86539f76c (patch)
tree838a0a2bc8c76ff14061d2cb1d442e1e487df248 /win/tclWinInit.c
parentbbbf72f5942c4fca232299946e6169fb4e796bcb (diff)
downloadtcl-9c4ceb163fd879f11fc0c03f0b20f8b86539f76c.zip
tcl-9c4ceb163fd879f11fc0c03f0b20f8b86539f76c.tar.gz
tcl-9c4ceb163fd879f11fc0c03f0b20f8b86539f76c.tar.bz2
* win/tclWinInit.c (TclpSetInitialEncodings): note that WIN32_CE
is also a unicode platform. * generic/tclEncoding.c (TclFindEncodings, Tcl_FindExecutable): * generic/tclInt.h: Correct handling of UTF * unix/tclUnixInit.c (TclpInitLibraryPath): data that is actually * win/tclWinFile.c (TclpFindExecutable): "clean", allowing the * win/tclWinInit.c (TclpInitLibraryPath): loading of Tcl from paths that contain multi-byte chars on Windows [Bug 920667]
Diffstat (limited to 'win/tclWinInit.c')
-rw-r--r--win/tclWinInit.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/win/tclWinInit.c b/win/tclWinInit.c
index 98a6936..fb3c026 100644
--- a/win/tclWinInit.c
+++ b/win/tclWinInit.c
@@ -7,7 +7,7 @@
* Copyright (c) 1998-1999 by Scriptics Corporation.
* All rights reserved.
*
- * RCS: @(#) $Id: tclWinInit.c,v 1.45 2004/02/12 23:19:17 mdejong Exp $
+ * RCS: @(#) $Id: tclWinInit.c,v 1.46 2004/04/07 22:04:31 hobbs Exp $
*/
#include "tclWinInt.h"
@@ -172,7 +172,7 @@ TclpInitPlatform()
* Called at process initialization time.
*
* Results:
- * None.
+ * Return 0, indicating that the UTF is clean.
*
* Side effects:
* None.
@@ -180,7 +180,7 @@ TclpInitPlatform()
*---------------------------------------------------------------------------
*/
-void
+int
TclpInitLibraryPath(path)
CONST char *path; /* Potentially dirty UTF string that is */
/* the path to the executable name. */
@@ -337,6 +337,8 @@ TclpInitLibraryPath(path)
}
TclSetLibraryPath(pathPtr);
+
+ return 0; /* 0 indicates that pathPtr is clean (true) utf */
}
/*
@@ -576,14 +578,17 @@ TclpSetInitialEncodings()
char buf[4 + TCL_INTEGER_SPACE];
if (libraryPathEncodingFixed == 0) {
- int platformId;
+ int platformId, useWide;
+
platformId = TclWinGetPlatformId();
- TclWinSetInterfaces(platformId == VER_PLATFORM_WIN32_NT);
+ useWide = ((platformId == VER_PLATFORM_WIN32_NT)
+ || (platformId == VER_PLATFORM_WIN32_CE));
+ TclWinSetInterfaces(useWide);
wsprintfA(buf, "cp%d", GetACP());
Tcl_SetSystemEncoding(NULL, buf);
- if (platformId != VER_PLATFORM_WIN32_NT) {
+ if (!useWide) {
Tcl_Obj *pathPtr = TclGetLibraryPath();
if (pathPtr != NULL) {
int i, objc;