in reply to Help for "Cannot decode string with wide characters..." and CGI.pm

Get rid of

binmode(STDIN, ":utf8");

Your corrupting the data stream passed to CGI. The proper way to decode the parameters is using

use CGI qw(-utf8);

which you already use. Speaking of doing the same thing twice, you did *that* twice too! First you tell Perl the source code is UTF-8

use utf8;

then you tell it again using a buggy version of the first method.

use encoding 'utf8';

The encoding is UTF-8, by the way. utf8 is something else.