�y本 直�o a écrit :
> Thanks for all your help.
>
> I hope I can use 2bytes charactor file names without code modification in the
> future release.
>
Could you try this function ?
function cleanFilenameDocument($name){
// See http://en.wikipedia.org/wiki/Filename
$bad_chars = array("'", "\\", ' ', '/', ':', '*', '?', '"', '<', '>', '|');
$name = str_replace($bad_chars, '_', $name);
$name = preg_replace("/%(\w{2})/", '_', $name);
return preg_replace("/\\x00-\\x1f/u", '_', $name);
}
Regards
Julien
_______________________________________________
Glpi-user mailing list
[email protected]
https://mail.gna.org/listinfo/glpi-user