in reply to Re: Remove u200b unicode From String
in thread Remove u200b unicode From String

Thanks for your suggestions. Unfortunately, none of the suggestions worked. I still get the Sustainable B?usiness?.

-Phil-

Replies are listed 'Best First'.
Re^3: Remove u200b unicode From String
by NERDVANA (Priest) on Jul 25, 2024 at 08:06 UTC
    Did you see my comment about the string needing to be recognized as Unicode by perl? If perl is seeing utf8 bytes, it can't match a unicode character.

    Try printing this:

    use B; say B::perlstring($myvalue);
Re^3: Remove u200b unicode From String
by ikegami (Patriarch) on Jul 25, 2024 at 13:40 UTC

    So you don't have character 0x200B. What do you have? You can use sprintf "%vX", $str for that.

Re^3: Remove u200b unicode From String
by mldvx4 (Friar) on Jul 25, 2024 at 07:09 UTC

    Just wild guess, but if your data has line breaks then you might try adding the /m modifier to the substitution.

    s/\x{200B}//gm