summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--generic/tclIOUtil.c4
-rw-r--r--tests/source.test2
2 files changed, 3 insertions, 3 deletions
diff --git a/generic/tclIOUtil.c b/generic/tclIOUtil.c
index 62553f2..9905256 100644
--- a/generic/tclIOUtil.c
+++ b/generic/tclIOUtil.c
@@ -1744,7 +1744,7 @@ Tcl_FSEvalFileEx(
* otherwise replace them [Bug 3466099].
*/
if (Tcl_ReadChars(chan, objPtr, -1,
- memcmp(string, "\xef\xbf\xbe", 3)) < 0) {
+ memcmp(string, "\xef\xbb\xbf", 3)) < 0) {
Tcl_Close(interp, chan);
Tcl_AppendResult(interp, "couldn't read file \"",
Tcl_GetString(pathPtr), "\": ", Tcl_PosixError(interp), NULL);
@@ -1871,7 +1871,7 @@ TclNREvalFile(
* otherwise replace them [Bug 3466099].
*/
if (Tcl_ReadChars(chan, objPtr, -1,
- memcmp(string, "\xef\xbf\xbe", 3)) < 0) {
+ memcmp(string, "\xef\xbb\xbf", 3)) < 0) {
Tcl_Close(interp, chan);
Tcl_AppendResult(interp, "couldn't read file \"",
Tcl_GetString(pathPtr), "\": ", Tcl_PosixError(interp), NULL);
diff --git a/tests/source.test b/tests/source.test
index 9d09429..d71212d 100644
--- a/tests/source.test
+++ b/tests/source.test
@@ -112,7 +112,7 @@ test source-2.7 {utf-8 with BOM} -setup {
} -body {
set out [open $sourcefile w]
fconfigure $out -encoding utf-8
- puts $out "\ufffeset y new-y"
+ puts $out "\ufeffset y new-y"
close $out
set y old-y
source -encoding utf-8 $sourcefile