STDIN is used to transfer something that isn't text.
What you mean: isn't text. What else? And how then transfer the text and make perl to understand it is UTF-8 encoded?
Strange thing: i have full site running years in UTF-8, every CGI-script has this "use open ':std' => ':encoding(UTF-8)';" at beginning (pretty much the same init block as in this example above), because without it i just did not get anything to work... Now i copied it to another project, stripped down to skeleton and it does not work anymore... It is too mysterious to me.