PDA

View Full Version : Encoding for character entitdy references like ™


designsimply
05-06-2005, 12:25 PM
I am running PhpDig 1.8.7. My PHPDIG_ENCODING var is set correctly to match the files on my site, but PhpDig is converting things like ™ to ™. It looks like it is trying to turn & into & even if it is part of another character entity reference. How can I fix this?

designsimply
05-06-2005, 01:00 PM
I found an HTML ENTITIES section in config.php, and in the $spec array, there are things like "&egrave" => "\350". What is the \350 and how do I look it up for other characters such as the greek lowercase beta, & #946;, and the trademark symbol, & #8482; or & trade;.

Charter
05-10-2005, 10:21 AM
The current $spec array is set as follows:

//----------HTML ENTITIES
$spec = array( "&amp" => "&",
"&agrave" => "*",
"&egrave" => "è",
"&ugrave" => "ù",
"ó" => "ó",
"&eacute" => "é",
"&icirc" => "î",
"&ocirc" => "ô",
"&ucirc" => "û",
"&ecirc" => "ê",
"&ccedil" => "ç",
"œ" => "oe",
"&gt" => " ",
"&lt" => " ",
"&deg" => " ",
"&apos" => "'",
"&quot" => " ",
"&acirc" => "â",
"&iuml" => "ï",
"&euml" => "ë",
"&auml" => "ä",
"&Auml" => "Ä",
"&Euml" => "Ë",
"&Iuml" => "Ï",
"&Uuml" => "Ü",
"&ouml" => "ö",
"&uuml" => "ü",
"&nbsp" => " ",
"&szlig" => "ß",
"&iacute" => "*",
"&reg" => " ",
"&copy" => " ",
"&aacute" => "á",
"&Aacute" => "Á",
"&eth" => "ð",
"&ETH" => "Ð",
"&Eacute" => "É",
"&Iacute" => "Í",
"&Oacute" => "Ó",
"&uacute" => "ú",
"&Uacute" => "Ú",
"&THORN" => "Þ",
"&thorn" => "þ",
"&Ouml" => "Ö",
"&aelig" => "æ",
"&AELIG" => "Æ",
"&aring" => "å",
"&Aring" => "Å",
"&oslash" => "ø",
"&Oslash" => "Ø"
);

Try looking at it using a text only editor such as Notepad. The values on the right hand side are (extended) ASCII characters. There is a list of (extended) ASCII characters at www.asciitable.com.