public function Convert($aTxt, $aFF) { if (LANGUAGE_GREEK) { if (GREEK_FROM_WINDOWS) { $unistring = LanguageConv::gr_win2uni($aTxt); } else { $unistring = LanguageConv::gr_iso2uni($aTxt); } return $unistring; } elseif (LANGUAGE_CYRILLIC) { if (CYRILLIC_FROM_WINDOWS && (!defined('LANGUAGE_CHARSET') || stristr(LANGUAGE_CHARSET, 'windows-1251'))) { $aTxt = convert_cyr_string($aTxt, "w", "k"); } if (!defined('LANGUAGE_CHARSET') || stristr(LANGUAGE_CHARSET, 'koi8-r') || stristr(LANGUAGE_CHARSET, 'windows-1251')) { $isostring = convert_cyr_string($aTxt, "k", "i"); $unistring = LanguageConv::iso2uni($isostring); } else { $unistring = $aTxt; } return $unistring; } elseif ($aFF === FF_SIMSUN) { // Do Chinese conversion if ($this->g2312 == null) { include_once 'jpgraph_gb2312.php'; $this->g2312 = new GB2312toUTF8(); } return $this->g2312->gb2utf8($aTxt); } elseif ($aFF === FF_BIG5) { if (!function_exists('iconv')) { JpGraphError::RaiseL(25006); //('Usage of FF_CHINESE (FF_BIG5) font family requires that your PHP setup has the iconv() function. By default this is not compiled into PHP (needs the "--width-iconv" when configured).'); } return iconv('BIG5', 'UTF-8', $aTxt); } elseif (ASSUME_EUCJP_ENCODING && ($aFF == FF_MINCHO || $aFF == FF_GOTHIC || $aFF == FF_PMINCHO || $aFF == FF_PGOTHIC)) { if (!function_exists('mb_convert_encoding')) { JpGraphError::RaiseL(25127); } return mb_convert_encoding($aTxt, 'UTF-8', 'EUC-JP'); } elseif ($aFF == FF_DAVID || $aFF == FF_MIRIAM || $aFF == FF_AHRON) { return LanguageConv::heb_iso2uni($aTxt); } else { return $aTxt; } }
function Convert($aTxt, $aFF) { if (LANGUAGE_GREEK) { if (GREEK_FROM_WINDOWS) { $unistring = LanguageConv::gr_win2uni($aTxt); } else { $unistring = LanguageConv::gr_iso2uni($aTxt); } return $unistring; } elseif (LANGUAGE_CYRILLIC) { if (CYRILLIC_FROM_WINDOWS && (!defined('CYRILLIC_LANGUAGE_CHARSET') || stristr(CYRILLIC_LANGUAGE_CHARSET, 'windows-1251'))) { $aTxt = convert_cyr_string($aTxt, "w", "k"); } if (!defined('CYRILLIC_LANGUAGE_CHARSET') || stristr(CYRILLIC_LANGUAGE_CHARSET, 'koi8-r') || stristr(CYRILLIC_LANGUAGE_CHARSET, 'windows-1251')) { $isostring = convert_cyr_string($aTxt, "k", "i"); $unistring = LanguageConv::iso2uni($isostring); } else { $unistring = $aTxt; } return $unistring; } elseif ($aFF === FF_SIMSUN) { if ($this->g2312 == null) { include_once 'jpgraph_gb2312.php'; $this->g2312 = new GB2312toUTF8(); } return $this->g2312->gb2utf8($aTxt); } elseif ($aFF === FF_CHINESE) { if (!function_exists('iconv')) { JpGraphError::RaiseL(25006); } return iconv('BIG5', 'UTF-8', $aTxt); } elseif (ASSUME_EUCJP_ENCODING && ($aFF == FF_MINCHO || $aFF == FF_GOTHIC || $aFF == FF_PMINCHO || $aFF == FF_PGOTHIC)) { if (!function_exists('mb_convert_encoding')) { JpGraphError::RaiseL(25127); } return mb_convert_encoding($aTxt, 'UTF-8', 'EUC-JP'); } elseif ($aFF == FF_DAVID || $aFF == FF_MIRIAM || $aFF == FF_AHRON) { return $this->heb_iso2uni($aTxt); } else { return $aTxt; } }
function Convert($aTxt, $aFF) { if (LANGUAGE_CYRILLIC) { if (CYRILLIC_FROM_WINDOWS) { $aTxt = convert_cyr_string($aTxt, "w", "k"); } $isostring = convert_cyr_string($aTxt, "k", "i"); $unistring = LanguageConv::iso2uni($isostring); return $unistring; } elseif ($aFF === FF_SIMSUN) { // Do Chinese conversion if ($this->g2312 == null) { include_once 'jpgraph_gb2312.php'; $this->g2312 = new GB2312toUTF8(); } return $this->g2312->gb2utf8($aTxt); } elseif ($aFF === FF_CHINESE) { if (!function_exists('iconv')) { JpGraphError::Raise('Usage of FF_CHINESE (FF_BIG5) font family requires that your PHP setup has the iconv() function. By default this is not compiled into PHP (needs the "--width-iconv" when configured).'); } return iconv('BIG5', 'UTF-8', $aTxt); } else { return $aTxt; } }
function Convert($aTxt, $aFF) { if (LANGUAGE_CYRILLIC) { /* Auto-detect whether the cyrillic conversion ** based on the character_set info that has ** been passed to jpgraph from the including ** application. ** ** Call the cyrillic converter only when a cyrillic ** charset derivate is used. Otherwise do nothing ** and prevent from erraneously converted strings. */ if (CYRILLIC_FROM_WINDOWS && (!defined('LANGUAGE_CHARSET') || stristr(LANGUAGE_CHARSET, 'windows-1251'))) { $aTxt = convert_cyr_string($aTxt, "w", "k"); } if (!defined('LANGUAGE_CHARSET') || stristr(LANGUAGE_CHARSET, 'koi8-r') || stristr(LANGUAGE_CHARSET, 'windows-1251')) { $isostring = convert_cyr_string($aTxt, "k", "i"); $unistring = LanguageConv::iso2uni($isostring); } else { $unistring = $aTxt; } return $unistring; } elseif ($aFF === FF_SIMSUN) { // Do Chinese conversion if ($this->g2312 == null) { include_once 'jpgraph_gb2312.php'; $this->g2312 = new GB2312toUTF8(); } return $this->g2312->gb2utf8($aTxt); } elseif ($aFF === FF_CHINESE) { if (!function_exists('iconv')) { JpGraphError::RaiseL(25006); //('Usage of FF_CHINESE (FF_BIG5) font family requires that your PHP setup has the iconv() function. By default this is not compiled into PHP (needs the "--width-iconv" when configured).'); } return iconv('BIG5', 'UTF-8', $aTxt); } else { return $aTxt; } }
function ToCyrillic($aTxt) { $koistring = $aTxt; $isostring = convert_cyr_string($koistring, "k", "i"); $unistring = LanguageConv::iso2uni($isostring); $this->t = $unistring; return $aTxt; }
function Convert($aTxt, $aFF) { if (LANGUAGE_CYRILLIC) { if (CYRILLIC_FROM_WINDOWS) { $aTxt = convert_cyr_string($aTxt, "w", "k"); } $isostring = convert_cyr_string($aTxt, "k", "i"); $unistring = LanguageConv::iso2uni($isostring); return $unistring; } elseif ($aFF === FF_SIMSUN) { // Do Chinese conversion if ($this->g2312 == null) { include_once 'jpgraph_gb2312.php'; $this->g2312 = new GB2312toUTF8(); } return $this->g2312->gb2utf8($aTxt); } else { return $aTxt; } }
function ToCyrillic($aTxt) { if (CYRILLIC_FROM_WINDOWS) { $aTxt = convert_cyr_string($aTxt, "w", "k"); } $isostring = convert_cyr_string($aTxt, "k", "i"); $unistring = LanguageConv::iso2uni($isostring); return $unistring; }
function ToCyrillic($aTxt) { if (false) { $aTxt = convert_cyr_string($aTxt, "w", "k"); } $isostring = convert_cyr_string($aTxt, "k", "i"); $unistring = LanguageConv::iso2uni($isostring); return $unistring; }
function Convert($aTxt, $aFF) { if (LANGUAGE_CYRILLIC) { if (CYRILLIC_FROM_WINDOWS) { $aTxt = convert_cyr_string($aTxt, "w", "k"); } $isostring = convert_cyr_string($aTxt, "k", "i"); $unistring = LanguageConv::iso2uni($isostring); return $unistring; } elseif (LANGUAGE_GREEK) { $isoline = $aTxt; for ($i = 0; $i < strlen($isoline); $i++) { $thischar = substr($isoline, $i, 1); $charcode = ord($thischar); $uniline .= $charcode > 175 ? "&#" . (896 + ($charcode - 176)) . ";" : $thischar; } return $uniline; } elseif ($aFF === FF_SIMSUN) { // Do Chinese conversion if ($this->g2312 == null) { include_once 'jpgraph_gb2312.php'; $this->g2312 = new GB2312toUTF8(); } return $this->g2312->gb2utf8($aTxt); } elseif ($aFF === FF_CHINESE) { if (!function_exists('iconv')) { JpGraphError::Raise('Usage of FF_CHINESE (FF_BIG5) font family requires that your PHP setup has the iconv() function. By default this is not compiled into PHP (needs the "--width-iconv" when configured).'); } return iconv('BIG-5', 'UTF8', $aTxt); } else { return $aTxt; } }