[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#959474: Issues with Chinese language (all variants) when building some pages in buster



* Damyan Ivanov <dmn@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


Reply to: