Thank you Julien.

I modified the function and tried to upload some documents with file names of 2 
bytes, they still remained.
I think it had much better method than too simple code 'return ($name);'.I'll 
try to test continuously this function in our environment.

Regards.



> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]] On Behalf Of MoYo
> Sent: Sunday, January 11, 2009 9:07 AM
> To: Liste de diffusion des utilsateurs de GLPI
> Subject: Re: [Glpi-user] an issue of 2bytes charactor file name
>
> �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

Reply via email to