Welcome Guest, Not a member yet? Register   Sign In
[directory helper] Error when high ascii in dir
#1

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

Is it the expected result or it is a bug?

Confused
Reply
#2

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:
copy($source$destination); 
when $source or $destination had special chars...
Reply




Theme © iAndrew 2016 - Forum software by © MyBB