|
2023-04-21
| ||
| 23:02 | • Closed ticket [eabcbd0827]: read error persists on channel with strict encodin... artifact: 7095a50a45 user: pooryorick | |
|
2023-04-19
| ||
| 07:14 | • Ticket [eabcbd0827]: 4 changes artifact: f93f30508b user: pooryorick | |
|
2023-04-16
| ||
| 23:20 | • Ticket [eabcbd0827]: 3 changes artifact: 53b75900bd user: pooryorick | |
| 23:11 | • Ticket [eabcbd0827]: 3 changes artifact: 9c0bb685db user: pooryorick | |
| 23:10 | Fix for [eabcbd08274f2d22], [read] error persists on channel with strict encoding after encoding is ... check-in: 3fa3d48874 user: pooryorick tags: trunk, main | |
| 23:02 | • New ticket [eabcbd0827] read error persists on channel with strict encoding af... artifact: 08ca84a852 user: pooryorick | |
[read] error persists on channel with strict encoding after encoding is changed to binary
Closed / Fixedeabcbd08274f2d22351fa96d972e4abfd08a8329Created 4 years agoUpdated 4 years ago
Descriptionwiki2023-04-16 23:02:06
In the script below, after the first [read] returns an encoding error, the
channel is reconfigured to
-encoding iso8859-1, and the
subsequent [read] should return character \x81, but instead it
repeats the error:
set res {}
set chan [file tempfile]
fconfigure $chan -encoding binary
# \x81 is invalid in utf-8. -eofchar is not detected, because it comes later.
puts -nonewline $chan A\x81\x1A
flush $chan
seek $chan 0
fconfigure $chan -encoding utf-8 -buffering none -eofchar \x1A \
-translation lf -profile strict
catch {read $chan} cres
puts $cres ;#-> error reading "file*": invalid or incomplete multibyte or wide character
puts [list eof [eof $chan]] ;#-> eof 1
puts [list position [tell $chan]] ;#-> position 1
chan configure $chan -encoding iso8859-1
catch {read $chan} cres
puts $cres] ;#-> error reading "file*": invalid or incomplete multibyte or wide character
pooryorickwiki2023-04-16 23:11:36
Fixed in [3fa3d48874].
pooryorick Ticket [eabcbd0827]: 3 changes
[History diff]2023-04-16 23:20:09
pooryorick Ticket [eabcbd0827]: 4 changes
[History diff]2023-04-19 07:14:01
pooryorick Closed ticket [eabcbd0827].
[History diff]2023-04-21 23:02:25
Log in (anonymous is fine) to add a comment.