#|
Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Collectives on Stack Overflow. Learn more. How to convert these strange characters? Asked 10 years, 9 months ago. Active 1 year, 5 months ago. Viewed k times. I use utf8 for header page and MySQL encode. How does this happen?
Improve this question. Andrew Lott 15 15 bronze badges. Leonardo Leonardo 2, 6 6 gold badges 28 28 silver badges 32 32 bronze badges. You need to add more context. Where do these characters show up, what encoding are your tables in, what does the code look like to retrieve the data These are UTF-8 sequences when displayed on a Latin-1 charset website.
I assume this isn't actually the case yet. Add a comment. Active Oldest Votes. Improve this answer. Ray Ray 1, 6 6 silver badges 10 10 bronze badges. This may happen to fix the problem at hand, but it is much, much better to get all encodings in the process right in the first place.
But you say that's wrong, I didn't know that, how would you deal with this? In a modern web site setup where the database, the database connection, and the output page encoding are UTF-8, it will not be necessary to do those conversions any more. That is the recommended way when building PHP projects from scratch. While it would probably fix the problem the OP shows, fixing the problem at its root if possible is much preferable.
Collectives on Stack Overflow. Learn more. How to convert these strange characters? Asked 10 years, 9 months ago. Active 1 year, 5 months ago. Viewed k times. I use utf8 for header page and MySQL encode. How does this happen? Improve this question. Andrew Lott 15 15 bronze badges. Leonardo Leonardo 2, 6 6 gold badges 28 28 silver badges 32 32 bronze badges.
You need to add more context. Where do these characters show up, what encoding are your tables in, what does the code look like to retrieve the data These are UTF-8 sequences when displayed on a Latin-1 charset website.
I assume this isn't actually the case yet. Add a comment. Active Oldest Votes. Improve this answer. Ray Ray 1, 6 6 silver badges 10 10 bronze badges. This may happen to fix the problem at hand, but it is much, much better to get all encodings in the process right in the first place. But you say that's wrong, I didn't know that, how would you deal with this? In a modern web site setup where the database, the database connection, and the output page encoding are UTF-8, it will not be necessary to do those conversions any more.
That is the recommended way when building PHP projects from scratch. While it would probably fix the problem the OP shows, fixing the problem at its root if possible is much preferable. Gumbo Gumbo k gold badges silver badges bronze badges. But this byte sequence does represent something different when interpreted with a different character encoding.
0コメント