note 106813 added to function.readdir

From: Date: Thu, 08 Dec 2011 12:07:19 +0000
Subject: note 106813 added to function.readdir
Groups: php.notes 
Request: Send a blank email to php-notes+get-184976@lists.php.net to get a copy of this message
OS-10 incompatibility with other platforms. (linux, Unix, windows......) Acceted MB-chars are coverted in the OS-10 filing system when you STORE files on disc. They are split into the simple ascii char. plus a 2 byte COMBINING accent. Visualy there is no difference but Binary there is !!!! This workes fine as long as you stay within the OS-10 enviroment. exception in PHP: readir(). (it returnes the filenames as stored on disc.) the problem arrises when you export any of the files again to a NON OS-10 platform !!!! The filenames are NOT reconverted to their original filenames !!!!! =================================================================== It makes the programs on other platforms unable to find the files !!!!!!!!! example: Using RSYNC between 2 MACs: NO PROBLEM ! Using RSYNC between a MAC and a Linux, Unix or Windows platform: BIG PROBLEM !!! If you have the filenames stored in a DB, the names in the DB will NOT Match the filenames on the disc you exported them to. (ie. they are unknown) Due to the fact that other platforms do NOT have the filename translation in their filing system. There are several ways to overcome this PROBLEM. None of witch are simple and straightforeward. 1) Translate the names in the DB so that they binary match the filenames on disc. This would have been easy if there was a system call to translate a given filename to the way this filename is stored on disc (OS-10). 2) Rename the files on disc and in the DB, by eliminating any of the problem chars ! 3) Using a script that at the time of usage of a filename translates it depending on what platform you are !!! As you can see, this is no easy NUT TO CRACK !! ---- Server IP: 194.50.97.14 Probable Submitter: 109.128.221.146 ---- Manual Page -- http://www.php.net/manual/en/function.readdir.php Edit -- https://master.php.net/note/edit/106813 Del: integrated -- https://master.php.net/note/delete/106813/integrated Del: useless -- https://master.php.net/note/delete/106813/useless Del: bad code -- https://master.php.net/note/delete/106813/bad+code Del: spam -- https://master.php.net/note/delete/106813/spam Del: non-english -- https://master.php.net/note/delete/106813/non-english Del: in docs -- https://master.php.net/note/delete/106813/in+docs Del: other reasons-- https://master.php.net/note/delete/106813 Reject -- https://master.php.net/note/reject/106813 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#184976) next »