[Dub-pm] Quick pack question.

Fergal Daly fergal at esatclear.ie
Wed Oct 13 11:50:47 CDT 2004

On Wed, Oct 13, 2004 at 04:29:56PM +0100, Aidan Kehoe wrote:
>  Ar an tri? l? d?ag de m? Deireadh F?mhair, scr?obh Fergal Daly: 
>  > It's probably more correct to say that pack usually takes something nice
>  > and readable and turns it into binary and unpack usually takes something
>  > binary and turns it into something nice and readable. So going from
>  > binary to binary requires one of each,
> [OT, and not to pick on you, but this use of "binary" drives me mad. All the
> data in question are on a computer, they've thus got an inherent digital,
> binary nature, and octets with the high bit set can be as valid as text as
> those in the range 0x20-0x7e. And it's this sort of limited thinking that
> means people in China can't use Chinese in their domain names.]

I didn't say that binary implies "octets with the high bit set" or vice
versa. In fact in the seven2eight() subroutine the "binary" output of pack()
is actually an ascii string. Binary here just means a sequence of raw bits
which need further interpretation as opposed to a list of integers or string
of characters (these being the "nice and readable" things I was referring

Someone could add an encoding to pack/unpack similar to the "b" encoding but
instead of taking strings of "0" and "1"s it took strings of "零" and
"一"s (the Chinese characters for "0" and "1" - assuming my mailer doesn't
mangle them). I'd still say it's output is binary and it's input isn't (even
though it's input is distinctly non-ascii).


More information about the Dublin-pm mailing list