1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
|
}
string = Tcl_GetString(objPtr);
/*
* If first character is not a BOM, append the remaining characters,
* otherwise replace them [Bug 3466099].
*/
if (Tcl_ReadChars(chan, objPtr, -1,
memcmp(string, "\xef\xbf\xbe", 3)) < 0) {
Tcl_Close(interp, chan);
Tcl_AppendResult(interp, "couldn't read file \"",
Tcl_GetString(pathPtr), "\": ", Tcl_PosixError(interp), NULL);
goto end;
}
if (Tcl_Close(interp, chan) != TCL_OK) {
|
|
|
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
|
}
string = Tcl_GetString(objPtr);
/*
* If first character is not a BOM, append the remaining characters,
* otherwise replace them [Bug 3466099].
*/
if (Tcl_ReadChars(chan, objPtr, -1,
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);
goto end;
}
if (Tcl_Close(interp, chan) != TCL_OK) {
|