protected function OAuthStoreAbstract::makeUTF8 in Lingotek Translation 7.4
Same name and namespace in other branches
- 7.7 lib/oauth-php/library/store/OAuthStoreAbstract.class.php \OAuthStoreAbstract::makeUTF8()
- 7.2 lib/oauth-php/library/store/OAuthStoreAbstract.class.php \OAuthStoreAbstract::makeUTF8()
- 7.3 lib/oauth-php/library/store/OAuthStoreAbstract.class.php \OAuthStoreAbstract::makeUTF8()
- 7.5 lib/oauth-php/library/store/OAuthStoreAbstract.class.php \OAuthStoreAbstract::makeUTF8()
- 7.6 lib/oauth-php/library/store/OAuthStoreAbstract.class.php \OAuthStoreAbstract::makeUTF8()
* Make a string utf8, replacing all non-utf8 chars with a '.' * *
Parameters
string: * @return string
3 calls to OAuthStoreAbstract::makeUTF8()
- OAuthStoreOracle::addLog in lib/
oauth-php/ library/ store/ OAuthStoreOracle.php - * Add an entry to the log table * *
- OAuthStorePostgreSQL::addLog in lib/
oauth-php/ library/ store/ OAuthStorePostgreSQL.php - Add an entry to the log table
- OAuthStoreSQL::addLog in lib/
oauth-php/ library/ store/ OAuthStoreSQL.php - * Add an entry to the log table * *
File
- lib/
oauth-php/ library/ store/ OAuthStoreAbstract.class.php, line 128
Class
- OAuthStoreAbstract
- Abstract base class for OAuthStore implementations
Code
protected function makeUTF8($s) {
if (function_exists('iconv')) {
do {
$ok = true;
$text = @iconv('UTF-8', 'UTF-8//TRANSLIT', $s);
if (strlen($text) != strlen($s)) {
// Remove the offending character...
$s = $text . '.' . substr($s, strlen($text) + 1);
$ok = false;
}
} while (!$ok);
}
return $s;
}