summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2005-11-03 16:16:28 (GMT)
committerdgp <dgp@users.sourceforge.net>2005-11-03 16:16:28 (GMT)
commitb6a925833d204aad9696d5bdeb784724a67ea504 (patch)
tree1cc1cd7103f54036912df0c32dfec7dcbfd99f23
parent70b0f37994c80b2ecf30178e140a144d45afcb8b (diff)
downloadtcl-b6a925833d204aad9696d5bdeb784724a67ea504.zip
tcl-b6a925833d204aad9696d5bdeb784724a67ea504.tar.gz
tcl-b6a925833d204aad9696d5bdeb784724a67ea504.tar.bz2
* generic/tclUnixInit.c (TclpSetInitialEncodings): Modified so
that multiple calls can continue to atttempt to properly set the system encoding. Needed for Tclkit to properly support non-default encodings. Thanks to Yaroslav Schekin. [Bug 1201171].
-rw-r--r--ChangeLog7
-rw-r--r--unix/tclUnixInit.c5
2 files changed, 10 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 9573811..ad282ba 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2005-11-03 Don Porter <dgp@users.sourceforge.net>
+
+ * generic/tclUnixInit.c (TclpSetInitialEncodings): Modified so
+ that multiple calls can continue to atttempt to properly set the
+ system encoding. Needed for Tclkit to properly support non-default
+ encodings. Thanks to Yaroslav Schekin. [Bug 1201171].
+
2005-11-03 Pat Thoyts <patthoyts@users.sourceforge.net>
* win/tclWin32Dll.c: Backported Anton Kovalenko's patch #1256872
diff --git a/unix/tclUnixInit.c b/unix/tclUnixInit.c
index 3f4b454..13a8cee 100644
--- a/unix/tclUnixInit.c
+++ b/unix/tclUnixInit.c
@@ -7,7 +7,7 @@
* Copyright (c) 1999 by Scriptics Corporation.
* All rights reserved.
*
- * RCS: @(#) $Id: tclUnixInit.c,v 1.34.2.10 2005/10/23 22:01:31 msofer Exp $
+ * RCS: @(#) $Id: tclUnixInit.c,v 1.34.2.11 2005/11/03 16:16:29 dgp Exp $
*/
#if defined(HAVE_COREFOUNDATION)
@@ -493,7 +493,6 @@ CONST char *path; /* Path to the executable in native
void
TclpSetInitialEncodings()
{
- if (libraryPathEncodingFixed == 0) {
CONST char *encoding = NULL;
int i, setSysEncCode = TCL_ERROR;
Tcl_Obj *pathPtr;
@@ -657,6 +656,8 @@ TclpSetInitialEncodings()
setlocale(LC_NUMERIC, "C");
+ if ((libraryPathEncodingFixed == 0) && strcmp("identity",
+ Tcl_GetEncodingName(Tcl_GetEncoding(NULL, NULL))) ) {
/*
* Until the system encoding was actually set, the library path was
* actually in the native multi-byte encoding, and not really UTF-8