• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[directory helper] Error when high ascii in dir


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... Angry

Is it the expected result or it is a bug?


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\...');
$tmp    directory_map($source); 

And this was also another problem I had with
PHP Code:
when $source or $destination had special chars...

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.