summaryrefslogtreecommitdiffstats
path: root/generic/tclEncoding.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2012-02-29 21:56:20 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2012-02-29 21:56:20 (GMT)
commit336410f92239eecba4d739de6e5b67cf02990694 (patch)
tree982b5959dd17b61c8f3b21f473dfbe426b40cfb6 /generic/tclEncoding.c
parentf3bdd208ac10cfe9a475b0689677acd542debee2 (diff)
parent6ad807858b1217d40a9e5a2c1d5bf241625971ca (diff)
downloadtcl-336410f92239eecba4d739de6e5b67cf02990694.zip
tcl-336410f92239eecba4d739de6e5b67cf02990694.tar.gz
tcl-336410f92239eecba4d739de6e5b67cf02990694.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;