develooper Front page | perl.perl5.porters | Postings from August 2018

Re: [perl #133431] Potential bug in IO::Socket

Thread Previous | Thread Next
From:
Tony Cook
Date:
August 14, 2018 00:29
Subject:
Re: [perl #133431] Potential bug in IO::Socket
Message ID:
18353_1534206547_5B722253_18353_12_1_20180814002847.fnlxuxx2q6fozxgw@mars.tony.develop-help.com
On Mon, Aug 13, 2018 at 12:27:46PM +0300, Βλάσης Χατζησταύρου wrote:
> Ah, thanks Tony that was helpful.
> 
> So I understand that from 5.30 onward we should NOT set :utf8 on the handle
> and let the receiving end deal with the stream ie decode it as UTF-8?

Correct.

Note that your code is already potentially broken with the :utf8 (or
even :encoding(UTF-8)) layer, since recv() and sysread() don't
validate the UTF-8 they read.

Tony

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About