diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2012-02-29 21:56:20 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2012-02-29 21:56:20 (GMT) |
commit | 336410f92239eecba4d739de6e5b67cf02990694 (patch) | |
tree | 982b5959dd17b61c8f3b21f473dfbe426b40cfb6 /generic/tclEncoding.c | |
parent | f3bdd208ac10cfe9a475b0689677acd542debee2 (diff) | |
parent | 6ad807858b1217d40a9e5a2c1d5bf241625971ca (diff) | |
download | tcl-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.c | 4 |
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; |