note 104776 added to function.utf8-encode

From: Date: Wed, 06 Jul 2011 20:12:02 +0000
Subject: note 104776 added to function.utf8-encode
Groups: php.notes 
Request: Send a blank email to php-notes+get-181297@lists.php.net to get a copy of this message
Conversion for Croatian characters: ___________ function croURLtoCHAR($text) { $url=array( "%C5%A0","%C5%A1", "%C4%90","%C4%91", "%C4%8C","%C4%8D", "%C4%86","%C4%87", "%C5%BD","%C5%BE" ); $char=array( "Š","š", "Đ","đ", "Č","č", "Ć","ć", "Ž","ž" ); return str_replace($url,$char,$text); } function croCHARtoURL($text) { $char=array( "Š","š", "Đ","đ", "Č","č", "Ć","ć", "Ž","ž" ); $url=array( "%C5%A0","%C5%A1", "%C4%90","%C4%91", "%C4%8C","%C4%8D", "%C4%86","%C4%87", "%C5%BD","%C5%BE" ); return str_replace($char,$url,$text); } ________________ NOTE: Obviously, you'll have to use other functions to replace/encode/decode the rest of the characters/code. ---- Server IP: 193.198.184.18 Probable Submitter: 95.178.137.203 ---- Manual Page -- http://www.php.net/manual/en/function.utf8-encode.php Edit -- https://master.php.net/note/edit/104776 Del: integrated -- https://master.php.net/note/delete/104776/integrated Del: useless -- https://master.php.net/note/delete/104776/useless Del: bad code -- https://master.php.net/note/delete/104776/bad+code Del: spam -- https://master.php.net/note/delete/104776/spam Del: non-english -- https://master.php.net/note/delete/104776/non-english Del: in docs -- https://master.php.net/note/delete/104776/in+docs Del: other reasons-- https://master.php.net/note/delete/104776 Reject -- https://master.php.net/note/reject/104776 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#181297) next »