It's not the shifting per se that creates the wide character; when you pass a numeric value greater than 255 to chr, it must return a wide character.
(I'm afraid I don't quite understand the reason(s) for what happens when the "use bytes" pragma is added -- if I've done it right, the only difference is to eliminate the warning message about the "wrapped character in unpack"; the resulting output is not changed. Is it the case that you got the particular pattern of zeros and ones you expected, and were just complaining about the warning message?)
In reply to Re: Character in 'b' format wrapped in unpack
by graff
in thread Character in 'b' format wrapped in unpack
by BrowserUk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |