- publishing free software manuals
Perl Language Reference Manual
by Larry Wall and others
Paperback (6"x9"), 724 pages
ISBN 9781906966027
RRP £29.95 ($39.95)

Sales of this book support The Perl Foundation! Get a printed copy>>>

Character in 'C' format wrapped in pack

(W pack) You said

pack("C", $x)

where $x is either less than 0 or more than 255; the "C" format is only for encoding native operating system characters (ASCII, EBCDIC, and so on) and not for Unicode characters, so Perl behaved as if you meant

pack("C", $x & 255)

If you actually want to pack Unicode codepoints, use the "U" format instead.

ISBN 9781906966027Perl Language Reference ManualSee the print edition