Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re^7: How to avoid decoding string to utf-8.

by haj (Curate)
on Oct 12, 2020 at 13:54 UTC ( #11122745=note: print w/replies, xml ) Need Help??


in reply to Re^6: How to avoid decoding string to utf-8.
in thread How to avoid decoding string to utf-8.

So you appear to have strings with different encodings in your database. That's really bad, because you won't get correct results from database queries until you get this fixed.

I have difficulties to understand why the regular expression does not change the result unless you are several levels of encoding away from the truth. This can happen if during the upgrade someone tried to fiddle with encoding until the result "looks right" in the browser - but what you actually have now is just a cancellation of errors. Encoding matters in the transfer from the browser form to the web application, when writing from the web application to the database, and in the opposite direction when reading from the database and when sending the data to your browser. Please tell us how you control encoding in these four places.

For obtaining some data for debugging, please print the data - good and bad - like this (also suggested by ikegami earlier in this thread):

printf("%vX", $testStr);

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (7)
As of 2021-01-20 21:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?