diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2012-02-29 21:34:46 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2012-02-29 21:34:46 (GMT) |
commit | 6ad807858b1217d40a9e5a2c1d5bf241625971ca (patch) | |
tree | 429c25c751c106db85c75db6345c91296dc73692 /generic/tclEncoding.c | |
parent | 9e0ab0841248c6ba0cf49036de9005c8d0120a28 (diff) | |
parent | 70ea61c893a776323211dbc1d3b5d1d10c7d745e (diff) | |
download | tcl-6ad807858b1217d40a9e5a2c1d5bf241625971ca.zip tcl-6ad807858b1217d40a9e5a2c1d5bf241625971ca.tar.gz tcl-6ad807858b1217d40a9e5a2c1d5bf241625971ca.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 2e0d51f..a4bea31 100644 --- a/generic/tclEncoding.c +++ b/generic/tclEncoding.c @@ -984,13 +984,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; |