Re: Output filters, data encoding

[email protected]
Newsgroups gmane.comp.apache.mod-perl
Message-ID <20191113181719.ozrtwsezk5hiswk4@pali>
On Wednesday 13 November 2019 19:12:10 André Warnier (tomcat/perl) wrote:
> My question is : can I - and how -, set the filehandle that corresponds to
> the $f->read(), to a UTF-8 layer ?
> I have tried
> 
> line 155: binmode($f,'encoding:(UTF-8)');

Hi André! When specifying PerlIO layer for file handle, you need to
write colon character before layer name. So correct binmode call is:

  binmode($f, ':encoding(UTF-8)');

> and that triggers an error :
>  Not a GLOB reference at (my filter) line 155.\n
> )
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.