what is the problem?
It's an ’
which has been encoded as CP-1252
instead of UTF-8
.
how to solve?
Use UTF-8
instead of CP-1252
to read/write/store/display the characters.
This is already defined in
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
This only instructs the client which encoding to use to display the characters. This doesn't instruct your own program which encoding to use to read/write/store/display the characters. The exact answer depends on the server side platform / database / programming language used.
Update:
Browser is already set on Unicode And content type is already set too
Once again, this information is irrelevant. As said, this only instructs the client which encoding to use to display the characters. But the actual problem is that you're already sending ’
to the client instead of ’
. The client is correctly displaying ’
as ’
using UTF-8
encoding. If the client was instructed to use for example ISO-8859-1
, you would likely have seen ââ¬â¢
instead.
Here are some more links to learn more about the problem:
ASP.NET MVC environments are already by default UTF-8. But if you're actually using it, then there's something really messed up.
Update 2: as per the comments, the data is coming from a database. You need to verify with an independent DB admin tool how the data look like. If the ’
is there, then you need to instruct the database connector to use UTF-8
as character encoding. If it already contains ’
, then likely the database itself needs to be instructed to store the data as UTF-8
. To achieve this, usually creating/altering the database and table as UTF-8
is sufficient. Here's a MySQL targeted example (copied from this article):
CREATE DATABASE db_name CHARACTER SET utf8;
CREATE TABLE tbl_name (...) CHARACTER SET utf8;
But if it is already UTF-8, then you need to take a step back. Who/what did store the data there? The problem is in there. Maybe it was stored from request parameters? If so, then you need to configure the request encoding.