PHP filesystem handling
All filesystems (Windows, Linux, Mac) support unicode filenames. The PHP Windows binaries do not support unicode! On Windows installations any PHP file related function will return ANSI filenames, and all file functions require filenames to be ANSI, not UTF-8! PHP on other platforms (Linux, Mac) correctly support unicode filenames and are not affected by this issue.
Since the database has been converted to UTF-8 any filenames will need to be converted from ANSI to UTF-8, as writing ANSI data to MySQL will fail. Also, filenames read from the database in UTF-8 will need to be utf8_decode() before being used with PHP file functions, otherwise they will fail.
Where files are requested by the server Apache then filenames should also be UTF-8 encoded on all platforms (Windows, Linux, Mac). An exception is when Simese is used which also doesn't support unicode and so filenames must be utf_decode().
Since the database has been converted to UTF-8 any filenames will need to be converted from ANSI to UTF-8, as writing ANSI data to MySQL will fail. Also, filenames read from the database in UTF-8 will need to be utf8_decode() before being used with PHP file functions, otherwise they will fail.
Where files are requested by the server Apache then filenames should also be UTF-8 encoded on all platforms (Windows, Linux, Mac). An exception is when Simese is used which also doesn't support unicode and so filenames must be utf_decode().
Leave a comment
(In swiss:1791) Added a filesystem function wrapper to convert file paths used in PHP functions to ANSI on Windows systems.
Updated streaming and image processing to use filesystem wrapper.
Refs #290
Updated streaming and image processing to use filesystem wrapper.
Refs #290