本文整理汇总了PHP中TCPDF_FONTS::UTF8ToLatin1方法的典型用法代码示例。如果您正苦于以下问题:PHP TCPDF_FONTS::UTF8ToLatin1方法的具体用法?PHP TCPDF_FONTS::UTF8ToLatin1怎么用?PHP TCPDF_FONTS::UTF8ToLatin1使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TCPDF_FONTS
的用法示例。
在下文中一共展示了TCPDF_FONTS::UTF8ToLatin1方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _escapetext
/**
* 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);
}
示例2: getInternalPageNumberAliases
/**
* 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;
}