Bug#959474: Issues with Chinese language (all variants) when building some pages in buster
Jakub Wilk <[email protected]>
| Newsgroups | gmane.linux.debian.devel.www |
|---|---|
| Message-ID | <20200505074301.sg5f4dvcyfdwawnr__32054.4000061759$1588664725$gmane$org@jwilk.net> |
* Damyan Ivanov <[email protected]>, 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