note 99514 added to function.imagettftext

From: Date: Fri, 20 Aug 2010 21:07:06 +0000
Subject: note 99514 added to function.imagettftext
Groups: php.notes 
Request: Send a blank email to php-notes+get-171907@lists.php.net to get a copy of this message
@ limalopex.eisfux.de Here is a shorter solution for the problem with german umlauts: function utf8_convert($text) { // convert to HTML entities $text = mb_convert_encoding($text, 'HTML-ENTITIES', "UTF-8"); // convert HTML entities to ISO-8859-1 $text = html_entity_decode($text, ENT_NOQUOTES, "ISO-8859-1"); // replace characters > ascii 127 to hexidecimal equivalents $out = ''; for($i = 0; $i < strlen($text); $i++) { $letter = $text[$i]; $num = ord($letter); if($num > 127) { // replace ascii > 127 $out .= '&#' . $num; } else { // leave letter intact $out .= $letter; } } return $out; } ---- Server IP: 69.147.83.197 Probable Submitter: 92.73.190.3 ---- Manual Page -- http://www.php.net/manual/en/function.imagettftext.php Edit -- https://master.php.net/note/edit/99514 Del: integrated -- https://master.php.net/note/delete/99514/integrated Del: useless -- https://master.php.net/note/delete/99514/useless Del: bad code -- https://master.php.net/note/delete/99514/bad+code Del: spam -- https://master.php.net/note/delete/99514/spam Del: non-english -- https://master.php.net/note/delete/99514/non-english Del: in docs -- https://master.php.net/note/delete/99514/in+docs Del: other reasons-- https://master.php.net/note/delete/99514 Reject -- https://master.php.net/note/reject/99514 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#171907) next »