From: <no...@tc...> - 2025-08-04 20:18:15
|
Automated mail by fx, on behalf of no...@tc... Ticket Change [99726b98fc3d7c4f68618b634e47a47be5ffe30fb2aee4b4a767f0d98101683e] ["crc32 -filename $name" end in error on files containing wrong encodings] By anonymous For Tcllib On 2025-08-04T20:12:25.845 Details https://core.tcl-lang.org/tcllib/tinfo?name=99726b98fc3d7c4f68618b634e47a47be5ffe30fb2aee4b4a767f0d98101683e Ticket https://core.tcl-lang.org/tcllib/tktview/7bd2d439ca61da14a9fc5e8372e5fb1f86c28ff1 Changed Fields assignee: comment: Old Tcl scripts running on 8.6.x+ with corresponding Tcllib for crc32 package read the files regardless of their encoding or with the system encoding. Now with Tcl 9.0.1 and corresponding Tcllib the crc32 package do the same, but the core checks for wrong encoding on read of file's content. The error message from "crc::crc32" with used option "-filename" gives on some files "invalid integer" than a checksum. All these files have not the same encoding as used from system and/or simple compatible (ASCII) text. Maybe new options for encoding (and/or binary or not) are needed? Best solution for now is not to use the convenient way: open file for them self, fconfigure it to the right encoding or binary, and finally run crc32 with this handle, afterwards closing file and unset used temporary variables. (Please set the Version for Tcl 9.0.1, I use on ActiveTcl 8.6.4.1 crc32 1.3.2 and found it on BAWT-distribution 3.0.1, thanks.) Best greetings, Thomas [TWu] login: anonymous ------------------------------------------------------------ See Tcl/Tk development @ http://core.tcl-lang.org/ ------------------------------------------------------------ |