Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Remove u200b unicode From String

by hippo (Archbishop)
on Jul 24, 2024 at 22:07 UTC ( [id://11160747]=note: print w/replies, xml ) Need Help??


in reply to Remove u200b unicode From String

200b is the utf-8 ZERO WIDTH SPACE character which is why it is essentially invisible in the database. All you need to do is decode the data when you extract it from the database and encode it when outputing it as HTML then this problem (and those caused by any other utf-8 characters in the data source) just vanishes.

I am using Class::DBIx

That may or may not be problematic but I would expect not. Check your database connection parameters as you may be able to specify automatic decoding on the fly. DBD::mysql has the mysql_enable_utf8mb4 option for this.


🦛

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11160747]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (7)
As of 2024-09-13 17:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    The PerlMonks site front end has:





    Results (21 votes). Check out past polls.

    Notices?
    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.