summaryrefslogtreecommitdiffstats
path: root/generic/tclEncoding.c
diff options
context:
space:
mode:
authornijtmans@users.sourceforge.net <jan.nijtmans>2012-02-29 21:56:20 (GMT)
committernijtmans@users.sourceforge.net <jan.nijtmans>2012-02-29 21:56:20 (GMT)
commit2ca5900e2c793863046284806ffe573864ed62b5 (patch)
tree982b5959dd17b61c8f3b21f473dfbe426b40cfb6 /generic/tclEncoding.c
parentb8ccbacc3acf351ad9e807b6d983fc0a3118a9b6 (diff)
parent27f2997b0bae6113da9da3d21bef2ce8b4b048e3 (diff)
downloadtcl-2ca5900e2c793863046284806ffe573864ed62b5.zip
tcl-2ca5900e2c793863046284806ffe573864ed62b5.tar.gz
tcl-2ca5900e2c793863046284806ffe573864ed62b5.tar.bz2
[Bug 3466099] BOM in Unicode
Diffstat (limited to 'generic/tclEncoding.c')
-rw-r--r--generic/tclEncoding.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/generic/tclEncoding.c b/generic/tclEncoding.c
index 15411d8..49418c9 100644
--- a/generic/tclEncoding.c
+++ b/generic/tclEncoding.c
@@ -979,13 +979,13 @@ Tcl_GetEncodingNames(
int
Tcl_SetSystemEncoding(
Tcl_Interp *interp, /* Interp for error reporting, if not NULL. */
- const char *name) /* The name of the desired encoding, or NULL
+ const char *name) /* The name of the desired encoding, or NULL/""
* to reset to default encoding. */
{
Tcl_Encoding encoding;
Encoding *encodingPtr;
- if (name == NULL) {
+ if (!name || !*name) {
Tcl_MutexLock(&encodingMutex);
encoding = defaultEncoding;
encodingPtr = (Encoding *) encoding;