in reply to Re^2: using binmode() to override default encoding specified in "use open"
in thread using binmode() to override default encoding specified in "use open"
The :encoding(...) that you pass to binmode is an example of a PerlIO layer, and the reason you can have more than one is that the layer system is supposed to be generic and usable for more than just encodings.
In practice, associating multiple :encoding(...) layers to a read stream would mean that the data gets "decoded" more than once. This is almost certainly an error, but might be just what you need to fix some bizarre cases of mis-encoded data.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^4: using binmode() to override default encoding specified in "use open"
by raygun (Scribe) on Jul 23, 2020 at 15:19 UTC | |
by jcb (Parson) on Jul 23, 2020 at 23:53 UTC |