note 80620 added to function.mb-convert-encoding

From: Date: Fri, 25 Jan 2008 12:36:30 +0000
Subject: note 80620 added to function.mb-convert-encoding
Groups: php.notes 
Request: Send a blank email to php-notes+get-135405@lists.php.net to get a copy of this message
Clean a string for use as filename by simply replacing all unwanted characters with underscore (ASCII converts to 7bit). It removes slightly more chars than necessary. Hope its useful. $fileName = 'Test:!"$%&/()=ÖÄÜöäü<<'; echo strtr(mb_convert_encoding($fileName,'ASCII'), ' ,;:?*#!§$%&/(){}<>=`´|\\\'"', '____________________________'); ---- Server IP: 192.35.244.50 Probable Submitter: 194.166.235.188 ---- Manual Page -- http://www.php.net/manual/en/function.mb-convert-encoding.php Edit -- https://master.php.net/note/edit/80620 Del: integrated -- https://master.php.net/note/delete/80620/integrated Del: useless -- https://master.php.net/note/delete/80620/useless Del: bad code -- https://master.php.net/note/delete/80620/bad+code Del: spam -- https://master.php.net/note/delete/80620/spam Del: non-english -- https://master.php.net/note/delete/80620/non-english Del: in docs -- https://master.php.net/note/delete/80620/in+docs Del: other reasons-- https://master.php.net/note/delete/80620 Reject -- https://master.php.net/note/reject/80620 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#135405) next »