Skip Menu |

This queue is for tickets about the Encode CPAN distribution.

Report information
The Basics
Id: 84282
Status: resolved
Priority: 0/
Queue: Encode

People
Owner: Nobody in particular
Requestors: victor [...] vsespb.ru
Cc:
AdminCc:

Bug Information
Severity: Unimportant
Broken in:
  • 2.35
  • 2.49
Fixed in: (no value)



Subject: deep recursion when encoding STDERR messages
I am not sure that it's something that should be fixed. Seems when error message is printed to STDERR, and error message contains a perl script name with non-ASCII 7 bits octets, and STDERR is set to single-byte encoding, Encode can throw and error like "\x{00d1}" does not map to koi8-r at ����/33.pl line 21. error will be thrown to STDERR too and cause deep recursion if perl script's filename contains characters which does not map to that encoding. investigation and PoC here http://www.perlmonks.org/?node_id=1026042 and seems this does no happen always, only when STDERR encoding does not match locale (at least I cannot reproduce at systems with KOI-8 locale)
You should not use PerlIO on STDERR because PerlIO modules may carp on STDERR, resulting deep recursion and such. Dan the Maintainer Thereof On Fri Mar 29 06:43:57 2013, vsespb wrote: Show quoted text
> I am not sure that it's something that should be fixed. > > Seems when error message is printed to STDERR, and error message > contains a perl script name with non-ASCII 7 bits octets, and STDERR > is set to single-byte encoding, Encode can throw and error like > > "\x{00d1}" does not map to koi8-r at ����/33.pl line 21. > > error will be thrown to STDERR too and cause deep recursion if perl > script's filename contains characters which does not map to that > encoding. > > investigation and PoC here http://www.perlmonks.org/?node_id=1026042 > > and seems this does no happen always, only when STDERR encoding does > not match locale (at least I cannot reproduce at systems with KOI-8 > locale)