summaryrefslogtreecommitdiffstats
path: root/generic/tclEncoding.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2012-02-29 21:17:35 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2012-02-29 21:17:35 (GMT)
commit70ea61c893a776323211dbc1d3b5d1d10c7d745e (patch)
tree73adf39b2338a6a278e999cfa368b35c224c87d3 /generic/tclEncoding.c
parent7695d3270788d56c1ba433909285dcab42414edb (diff)
parent725269055e427aba43ac90a8c1cc56645adeeefa (diff)
downloadtcl-70ea61c893a776323211dbc1d3b5d1d10c7d745e.zip
tcl-70ea61c893a776323211dbc1d3b5d1d10c7d745e.tar.gz
tcl-70ea61c893a776323211dbc1d3b5d1d10c7d745e.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 9432c05..a4a7027 100644
--- a/generic/tclEncoding.c
+++ b/generic/tclEncoding.c
@@ -764,13 +764,13 @@ Tcl_GetEncodingNames(interp)
int
Tcl_SetSystemEncoding(interp, name)
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;