PHP Classes

function flushSpecial

Recommend this page to a friend!

      RTF Parse class  >  All threads  >  function flushSpecial  >  (Un) Subscribe thread alerts  
Subject:function flushSpecial
Summary:Incomplete special case supplied
Messages:1
Author:Ethan Hunt
Date:2009-11-10 11:57:21
 

  1. function flushSpecial   Reply   Report abuse  
Picture of Ethan Hunt Ethan Hunt - 2009-11-10 11:57:21
Hello there,

There was only 38 special cases in this function, failing when I was reading Latin documents. I'm rewriting (mean, adding) it to 97 special cases. I will past only the case block.

switch($special) {
case "80": $this->out .= "€"; break;
case "a0": $this->out .= " "; break;
case "a1": $this->out .= "¡"; break;
case "a2": $this->out .= "¢"; break;
case "a3": $this->out .= "£"; break;
case "a4": $this->out .= "¤"; break;
case "a5": $this->out .= "¥"; break;
case "a6": $this->out .= "¦"; break;
case "a7": $this->out .= "§"; break;
case "a8": $this->out .= "¨"; break;
case "a9": $this->out .= "©"; break;
case "aa": $this->out .= "ª"; break;
case "ab": $this->out .= "«"; break;
case "ac": $this->out .= "¬"; break;
case "ad": $this->out .= "­"; break;
case "ae": $this->out .= "®"; break;
case "af": $this->out .= "¯"; break;
case "b0": $this->out .= "°"; break;
case "b1": $this->out .= "±"; break;
case "b2": $this->out .= "²"; break;
case "b3": $this->out .= "³"; break;
case "b4": $this->out .= "´"; break;
case "b5": $this->out .= "µ"; break;
case "b6": $this->out .= "¶"; break;
case "b7": $this->out .= "·"; break;
case "b8": $this->out .= "¸"; break;
case "b9": $this->out .= "¹"; break;
case "ba": $this->out .= "º"; break;
case "bb": $this->out .= "»"; break;
case "bc": $this->out .= "¼"; break;
case "bd": $this->out .= "½"; break;
case "be": $this->out .= "¾"; break;
case "bf": $this->out .= "¿"; break;
case "c0": $this->out .= "À"; break;
case "c1": $this->out .= "Á"; break;
case "c2": $this->out .= "Â"; break;
case "c3": $this->out .= "Ã"; break;
case "c4": $this->out .= "Ä"; break;
case "c5": $this->out .= "Å"; break;
case "c6": $this->out .= "Æ"; break;
case "c7": $this->out .= "Ç"; break;
case "c8": $this->out .= "È"; break;
case "c9": $this->out .= "É"; break;
case "ca": $this->out .= "Ê"; break;
case "cb": $this->out .= "Ë"; break;
case "cc": $this->out .= "Ì"; break;
case "cd": $this->out .= "Í"; break;
case "ce": $this->out .= "Î"; break;
case "cf": $this->out .= "Ï"; break;
case "d0": $this->out .= "Ð"; break;
case "d1": $this->out .= "Ñ"; break;
case "d2": $this->out .= "Ò"; break;
case "d3": $this->out .= "Ó"; break;
case "d4": $this->out .= "Ô"; break;
case "d5": $this->out .= "Õ"; break;
case "d6": $this->out .= "Ö"; break;
case "d7": $this->out .= "×"; break;
case "d8": $this->out .= "Ø"; break;
case "d9": $this->out .= "Ù"; break;
case "da": $this->out .= "Ú"; break;
case "db": $this->out .= "Û"; break;
case "dc": $this->out .= "Ü"; break;
case "dd": $this->out .= "Ý"; break;
case "de": $this->out .= "Þ"; break;
case "df": $this->out .= "ß"; break;
case "e0": $this->out .= "à"; break;
case "e1": $this->out .= "á"; break;
case "e2": $this->out .= "â"; break;
case "e3": $this->out .= "ã"; break;
case "e4": $this->out .= "ä"; break;
case "e5": $this->out .= "å"; break;
case "e6": $this->out .= "æ"; break;
case "e7": $this->out .= "ç"; break;
case "e8": $this->out .= "è"; break;
case "e9": $this->out .= "é"; break;
case "ea": $this->out .= "ê"; break;
case "eb": $this->out .= "ë"; break;
case "ec": $this->out .= "ì"; break;
case "ed": $this->out .= "í"; break;
case "ee": $this->out .= "î"; break;
case "ef": $this->out .= "ï"; break;
case "f0": $this->out .= "ð"; break;
case "f1": $this->out .= "ñ"; break;
case "f2": $this->out .= "ò"; break;
case "f3": $this->out .= "ó"; break;
case "f4": $this->out .= "ô"; break;
case "f5": $this->out .= "õ"; break;
case "f6": $this->out .= "ö"; break;
case "f7": $this->out .= "÷"; break;
case "f8": $this->out .= "ø"; break;
case "f9": $this->out .= "ù"; break;
case "fa": $this->out .= "ú"; break;
case "fb": $this->out .= "û"; break;
case "fc": $this->out .= "ü"; break;
case "fd": $this->out .= "ý"; break;
case "fe": $this->out .= "þ"; break;
case "ff": $this->out .= "ÿ"; break;
}