[directory helper] Error when high ascii in dir - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Development (https://forum.codeigniter.com/forumdisplay.php?fid=6) +--- Forum: Issues (https://forum.codeigniter.com/forumdisplay.php?fid=19) +--- Thread: [directory helper] Error when high ascii in dir (/showthread.php?tid=67837) |
[directory helper] Error when high ascii in dir - ayukawaa - 04-16-2017 Hi, In a client intranet with hundreds of directories and thousands of word/excel files I was having troubles with some dirs when using the directory helper (directory_map) and tracked to this... PHP Code: $map = directory_map('W:\Policy «B»\subdir1\subdir2\...'); $map = FALSE, not able to read dir contents because of the "«" chars ... I had to rename by myself almost 200 directories to get it to work because of this and other chars... Is it the expected result or it is a bug? RE: [directory helper] Error when high ascii in dir - ayukawaa - 04-17-2017 Ok, I get it... It's because of the code page of the filesystem... now THIS works as expected with special chars in the names of files / folders PHP Code: $source = iconv('UTF-8','Windows-1252','W:\Policy «B»\subdir1\subdir2\...'); And this was also another problem I had with PHP Code: copy($source, $destination); |