summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2016-02-03 19:22:19 (GMT)
committerdgp <dgp@users.sourceforge.net>2016-02-03 19:22:19 (GMT)
commitc8f626a51dd7139e69c1c685e6431046e548bad0 (patch)
treeb7364b344b03b3b47c830f315b046a566fbf755e /generic
parentd9bac150627c28d4fab62f85a2696cc87911946d (diff)
parent098b03f8f4259f1767486350c21f5b7e11a6e06b (diff)
downloadtk-c8f626a51dd7139e69c1c685e6431046e548bad0.zip
tk-c8f626a51dd7139e69c1c685e6431046e548bad0.tar.gz
tk-c8f626a51dd7139e69c1c685e6431046e548bad0.tar.bz2
merge 8.5
Diffstat (limited to 'generic')
-rw-r--r--generic/tkOption.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/generic/tkOption.c b/generic/tkOption.c
index 17989f8..95b140d 100644
--- a/generic/tkOption.c
+++ b/generic/tkOption.c
@@ -1086,7 +1086,7 @@ ReadOptionFile(
char *buffer;
int result, bufferSize;
Tcl_Channel chan;
- Tcl_DString newName, optString;
+ Tcl_DString newName;
/*
* Prevent file system access in a safe interpreter.
@@ -1136,16 +1136,7 @@ ReadOptionFile(
}
Tcl_Close(NULL, chan);
buffer[bufferSize] = 0;
- if ((bufferSize>2) && !memcmp(buffer, "\357\273\277", 3)) {
- /* File starts with UTF-8 BOM */
- result = AddFromString(interp, tkwin, buffer+3, priority);
- } else {
- Tcl_DStringInit(&optString);
- Tcl_ExternalToUtfDString(NULL, buffer, bufferSize, &optString);
- result = AddFromString(interp, tkwin, Tcl_DStringValue(&optString),
- priority);
- Tcl_DStringFree(&optString);
- }
+ result = AddFromString(interp, tkwin, buffer, priority);
ckfree(buffer);
return result;
}