I am making a certain class with complicated string manipulations.
Stuff works well with ' and ". However one of the texts had some weird quotes at an angle like this: ” and “ and in my code, the appear as †rather than actual quotes. That breakes my code, since its multiple characters, where it shouldn’t have been.
Can somebody please explain why this is happening, and how do you work it around?
either use utf-8 encoding or replace all non-fitting characters.
these quotes has no spechial meaning though, you can ignore them.
as it was discovered in the comments, the problem was in using substr instead of mb_substr(). So, with the latter the problem solved.