phildeman has asked for the wisdom of the Perl Monks concerning the following question:
Hi,
I hope you can help me with a dilemma that I have encountered.
I am rendering data in an HTML page. The data is coming from my database (mysql). The database gets updated on a nightly
basis from an external source.
When rendering the title of a book, a few, not many, show a '?'. When I check the database it does not show the '?'.
I copied and pasted the title into VI. VI showed <200b>.
So I inserted a regex substitution as I looped through the list of books. It did not remove it.
This is what I see in HTML, Sustainable B?usiness?
This is what I see in the database, Sustainable Business
I am using Class::DBIx. In the connection package I include 'use utf8;'. In the HTML page, I use <meta charset="UTF-8">.
Yet, it still shows the '?'. I have also tried several substitution Perl regexes. Here are a few:
$booktitle =~ s/\u200b//g; $booktitle =~ s/\x200b//g; $booktitle =~ s/\<200b\>//g:
Has anyone encountered this issue with a hidden unicode character? If yes, how did you remove the unicode character?
Thanks
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Remove u200b unicode From String
by hippo (Archbishop) on Jul 24, 2024 at 22:07 UTC | |
|
Re: Remove u200b unicode From String
by hv (Prior) on Jul 24, 2024 at 23:30 UTC | |
by NERDVANA (Priest) on Jul 25, 2024 at 01:14 UTC | |
by phildeman (Scribe) on Jul 25, 2024 at 04:30 UTC | |
|
Re: Remove u200b unicode From String
by Corion (Patriarch) on Jul 25, 2024 at 07:28 UTC | |
|
Re: Remove u200b unicode From String
by ikegami (Patriarch) on Jul 25, 2024 at 02:58 UTC | |
by phildeman (Scribe) on Jul 25, 2024 at 03:50 UTC | |
by NERDVANA (Priest) on Jul 25, 2024 at 08:06 UTC | |
by ikegami (Patriarch) on Jul 25, 2024 at 13:40 UTC | |
by mldvx4 (Hermit) on Jul 25, 2024 at 07:09 UTC | |
|
Re: Remove u200b unicode From String
by Danny (Chaplain) on Jul 24, 2024 at 20:52 UTC | |
|
Re: Remove u200b unicode From String
by vincentaxhe (Scribe) on Aug 05, 2024 at 03:52 UTC | |
by hippo (Archbishop) on Aug 05, 2024 at 08:57 UTC |