Subject: | mbswidth: short results for CR, NL, and TAB |
With Text-CharWidth-0.04, I get surprising results with carriage
returns, newlines, or tabs.
A sane case
$ perl -MText::CharWidth=mbswidth -le 'print mbswidth "foo"'
3
But then
$ perl -MText::CharWidth=mbswidth -le 'print mbswidth "foo\n"'
2
$ perl -MText::CharWidth=mbswidth -le 'print mbswidth "f\roo"'
2
$ perl -MText::CharWidth=mbswidth -le 'print mbswidth "fo\to"'
2
Weirder:
$ perl -MText::CharWidth=mbswidth -le 'print mbswidth "\t"'
-1
$ perl -MText::CharWidth=mbswidth -le 'print mbswidth "\t\r\n"'
-3