File: hash-compatibility-warning.inc

package info (click to toggle)
tcllib 2.0%2Bdfsg-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 83,560 kB
  • sloc: tcl: 306,798; ansic: 14,272; sh: 3,035; xml: 1,766; yacc: 1,157; pascal: 881; makefile: 124; perl: 84; f90: 84; python: 33; ruby: 13; php: 11
file content (21 lines) | stat: -rw-r--r-- 845 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21

[emph "BEWARE"]
The commands in this package expect binary data as their input.

When a [option -file] is provided then this is ensured by the commands
themselves, as they open the referenced file in binary mode.

When literal data, or a [option -channel] are provided instead, then the
command's [emph {caller is responsible}] for ensuring this fact.

The necessary conversion command is [cmd {encoding convertto utf-8 $string}].

[para]
[emph "ATTENTION"], there is a [emph "Tcl 9 COMPATIBILITY ISSUE"] here.

[para] [emph {Tcl 8.x silently mishandles}] non-binary input by cutting it
internally to size. I.e. by only using the low byte of a higher unicode point.
No error is thrown, the [emph {result is simply wrong}].

[para] [emph {Tcl 9 throws an error}] instead, i.e.
[example {expected byte sequence but character <location> was ...}]