http://qs321.pair.com?node_id=906418


in reply to Re: Simplest Possible Way To Disable Unicode
in thread Simplest Possible Way To Disable Unicode

it should be silently truncated.

no warnings qw( pack );

More to the point, I think unicode should be explicitly enabled by those that need it

You're getting an overflow warning. It has nothing to do with Unicode. In fact, pack and unpack don't use Unicode at all.*

* — Not even "U" has any understanding of Unicode.

>perl -wE"say sprintf '%X', unpack 'U', pack 'U', 0x200000" 200000