Re: binary scan and signed characters



On 30 aug, 10:20, "Donal K. Fellows" <donal.k.fell...@xxxxxxxxx>
wrote:
Arjen Markus wrote:
My question: is this platform-dependent behaviour? Is it because the
underlying C run-time library regards characters as signed? Or is Tcl
using signed characters and this behaviour is by design?

It's consistently that way, and I think it's because 'i'nts are also
signed, and that was how they had to be back when [binary] was
introduced on 32-bit platforms. 8.5 lets force an unsigned
interpretation with the 'u' flag, documented in TIP #275.

Donal.

Ah, right, I looked for something like that, but missed it (I looked
in
the list of format codes, but it is described in the introduction to
[binary scan]).

Thanks,

Arjen
.