diff options
Diffstat (limited to 'generic/tclConfig.c')
-rw-r--r-- | generic/tclConfig.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/generic/tclConfig.c b/generic/tclConfig.c index 1199e81..e7d9bf3 100644 --- a/generic/tclConfig.c +++ b/generic/tclConfig.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclConfig.c,v 1.14 2007/04/10 14:47:10 dkf Exp $ + * RCS: @(#) $Id: tclConfig.c,v 1.15 2007/11/05 19:58:48 andreas_kupries Exp $ */ #include "tclInt.h" @@ -71,6 +71,11 @@ Tcl_RegisterConfig( Tcl_Config *cfg; Tcl_Encoding venc = Tcl_GetEncoding(NULL, valEncoding); + if (venc == NULL) { + /* Fall back to a builtin encoding if the user supplied one is bogus. */ + venc = Tcl_GetEncoding(NULL, "iso8859-1"); + } + pDB = GetConfigDict(interp); pkg = Tcl_NewStringObj(pkgName, -1); |