Overview
| Artifact ID: | fcc8661d8329500fb37d4cd500f4ed1d15c0902fbbd86906840dd05988ff4ac1 |
|---|---|
| Ticket: | 8cae59ecb03a6269468379a1e028c01f604ce5de
Eliminate "-encoding binary" in favour of "-translation binary" |
| User & Date: | jan.nijtmans on 2024-07-01 21:20:36 |
Changes
- closedate changed to: "2460493.38930764"
- closer changed to: "jan.nijtmans"
- icomment:
TIP #699 is accepted now, there's no "-encoding binary" any more. @sebres suggested to change "-encoding binary" to function the same as "-translation binary": setting the -translation to lf and -eofchar to {} at the same time. The problem I see with this suggestion is that extensions can silently break. The follwing use-case: A channel is being read. In the middle, something happens (like an encoding error). The application wants to see what happens, so the -encoding is changed to "binary" (while the original encoding is stored in a variable). A few more bytes are read. Then the encoding is restored. If we follow @sebres' suggestion, setting -encoding to "binary" will also set the -eofchar and -translation. If the channel was in crlf translation mode, then it won't be restored any more: the resulting translation is changed to lf. The current solution in TIP #699 means that the code needs to change: You can no longer set a channel to -encoding "binary", just use -encoding iso8859-1 in stead (which does exactly the same here). Hope this helps - login: "jan.nijtmans"
- mimetype: "text/x-fossil-wiki"
- resolution changed to: "Fixed"
- status changed to: "Closed"