Bug#959474: Issues with Chinese language (all variants) when building some pages in buster
Jakub Wilk
jwilk at jwilk.net
Tue May 5 08:43:01 BST 2020
* Damyan Ivanov <dmn at debian.org>, 2020-05-05, 08:45:
>Strangely, replacing -CS with a call to STDIN->binmode("UTF-8")
>doesn't help:
>
> echo 包 | perl -E 'STDIN->binmode("UTF-8"); while(<>) { s|\s+\n|\n|sg; print }'
> �
That's because "UTF-8" is not a valid argument for binmode().
You want:
$ echo 包 | perl -E 'STDIN->binmode(":encoding(UTF-8)") or die; while(<>) { s|\s+\n|\n|sg; print }'
Wide character in print at -e line 1, <> line 1.
包
or:
$ echo 包 | perl -E 'STDIN->binmode(":utf8") or die; while(<>) { s|\s+\n|\n|sg; print }'
Wide character in print at -e line 1, <> line 1.
包
--
Jakub Wilk
More information about the Perl-maintainers
mailing list