问题
Ok i thought this where something easy to google, but the answers i found, did not fix my problem
In Chrome my RSS feeds are looking like this
"¿Qué es un serum antimanchas?"
But all the rest characters are ok ..
In Safari, is the oposit this line look fine but the rest of characters are wrong..and they look like
Espect�culo
I have this on my header wich it suppose to work, cant find the problem,
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="es" lang="es">
<head>
<title>Pcweb</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
NOTE: All files are saved with encode for UTF8 in sublime editor.
回答1:
What you see in Chrome is UTF-8 encoded data misinterpreted as ISO-8859-1 or windows-1252 encoded. For example, U+00BF “¿” is 0xC2 0xBF in UTF-8. Treating that as ISO-8859-1 data, you get U+00C2 “” U+00BF “¿”.
From the given data, it is impossible to say what goes wrong. My guess is that the data is sent with an HTTP Content-Type
header that declares the encoding as ISO-8859-1. The URL would be needed to verify this hypothesis.
The character “�” indicates a data error at the character level: the data contains a byte that does not denote any character, or part of a multi-byte representation of a character, in the character encoding being applied. This is most often encountered when ISO-8859-1 is being misinterpreted as UTF-8 encoded.
It seems that the data contains a mix of UTF-8 encoded data and ISO-8859-1 encoded data. The fix is to modify the system so that it consistently uses UTF-8 throughout, or at least converts everything to UTF-8 when data is being composed to be sent to a user agent.
来源:https://stackoverflow.com/questions/19484325/special-characters-utf8-not-displaying-in-safari