in reply to Re^2: What does utf8::upgrade actually do.
in thread What does utf8::upgrade actually do.
Your only real decision needs to be what to do for a codepoint > 0xff. Three obvious choices are: croak; treat each codepoint modulo 256, or carry the overflow into the next digit. So the string "\x40\x{150}\x60" would yield the integer value 0x615040. (I haven't looked at what endedness the function works to, but that should give you the general idea of what I mean.)
Dave.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: What does utf8::upgrade actually do.
by syphilis (Archbishop) on Feb 18, 2021 at 14:25 UTC |