in reply to Remove u200b unicode From String

See previous comments about encoding; but \x in a substitution takes exactly two hex digits unless you wrap the hex in braces: s/\x{200b}//g. Your second example is thus equivalent to s/\x{20}0b//g. This is of course for reasons of backward-compatibility with a pre-Unicode age.

\u is used for upper-casing a single character (the digit 2 in your first example).

Replies are listed 'Best First'.
Re^2: Remove u200b unicode From String
by NERDVANA (Priest) on Jul 25, 2024 at 01:14 UTC
    In addition, I believe perl must consider the string to be unicode characters before it will be able to match a unicode character from the pattern. Perl will only consider the string to be unicode if the DBD::mysql driver was told to use utf8.
Re^2: Remove u200b unicode From String
by phildeman (Scribe) on Jul 25, 2024 at 04:30 UTC

    Thanks. Unfortunately, using s/\x{200b}//g or s/\x{20}-0b//g did not work. I still get the Sustainable B?usiness?.

    -Phil-