/** * THIS METHOD IS DEPRECATED * Format a text string * @param $s (string) string to escape. * @return string escaped string. * @protected * @deprecated */ protected function _escapetext($s) { if ($this->isunicode) { if ($this->CurrentFont['type'] == 'core' or $this->CurrentFont['type'] == 'TrueType' or $this->CurrentFont['type'] == 'Type1') { $s = TCPDF_FONTS::UTF8ToLatin1($s, $this->isunicode, $this->CurrentFont); } else { //Convert string to UTF-16BE and reverse RTL language $s = TCPDF_FONTS::utf8StrRev($s, false, $this->tmprtl, $this->isunicode, $this->CurrentFont); } } return TCPDF_STATIC::_escape($s); }
/** * Return an array containing variations for the basic page number alias. * @param $a (string) Base alias. * @return array of page number aliases * @protected */ protected function getInternalPageNumberAliases($a = '') { $alias = array(); // build array of Unicode + ASCII variants (the order is important) $alias = array('u' => array(), 'a' => array()); $u = '{' . $a . '}'; $alias['u'][] = TCPDF_STATIC::_escape($u); if ($this->isunicode) { $alias['u'][] = TCPDF_STATIC::_escape(TCPDF_FONTS::UTF8ToLatin1($u, $this->isunicode, $this->CurrentFont)); $alias['u'][] = TCPDF_STATIC::_escape(TCPDF_FONTS::utf8StrRev($u, false, $this->tmprtl, $this->isunicode, $this->CurrentFont)); $alias['a'][] = TCPDF_STATIC::_escape(TCPDF_FONTS::UTF8ToLatin1($a, $this->isunicode, $this->CurrentFont)); $alias['a'][] = TCPDF_STATIC::_escape(TCPDF_FONTS::utf8StrRev($a, false, $this->tmprtl, $this->isunicode, $this->CurrentFont)); } $alias['a'][] = TCPDF_STATIC::_escape($a); return $alias; }