in reply to binmode, encoding layer, ignoring encoding problems

If I understand your question, you want to convert a string and replace non-convertable characters with ?. See Handling Malformed Data in Encode documentation.
  • Comment on Re: binmode, encoding layer, ignoring encoding problems

Replies are listed 'Best First'.
Re^2: binmode, encoding layer, ignoring encoding problems
by McA (Priest) on May 17, 2010 at 14:27 UTC
    Hi choroba,

    I know this piece of documentation. But how does it help me?

    Probably just some glue informations are missing, but at the moment I don't know how this document helps me.

    a) Encode says that the default for encoding is Encode::FB_DEFAULT and this means that there will be placed a substitution character when a character can't be encoded. That's not true with pushing an encoding layer to a file handle.

    b) Are the encoding mechanisms with the module Encode somehow interrelated with the encoding done by layers?

    Clearifing needed. :-)

    Best regards
    Andreas