when the internal data is already known to be the same as how it should be written (UTF-8).
syswrite and print print the string, not its internal data. The internal storage format is not relevant here.
>perl -we"$_ = chr(0xE9); utf8::downgrade($_); print;" | perl -nE"say +length;" 1 >perl -we"$_ = chr(0xE9); utf8::upgrade($_); print;" | perl -nE"say le +ngth;" 1 >perl -we"$_ = chr(1000); utf8::upgrade($_); print;" | perl -nE"say le +ngth;" Wide character in print at -e line 1. 2
In reply to Re^2: Simplest Possible Way To Disable Unicode
by ikegami
in thread Simplest Possible Way To Disable Unicode
by JapanIsShinto
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |