Re: [PHP] rename failes if file name contains single quotes

2003-01-31 Thread Ernest E Vogelsinger
At 09:52 31.01.2003, =?ISO-2022-JP?B?GyRCJVghPCVzGyhCIBskQiVIITwlXiU5GyhC?=
said:
[snip]
>when i try to rename a file with single quote(s) in the
>file name, e.g.
>
>rename("/tmp/foo 'n bar", "/tmp/foobar");
>
>rename fails with "there is no such file".
>whats wrong?
[snip] 

try to escape blanks and quotes:
rename("/tmp/foo\ \'n bar", "/tmp/foobar");

generally you should escape all non-ascii characters in file names.

-- 
   >O Ernest E. Vogelsinger
   (\)ICQ #13394035
^ http://www.vogelsinger.at/



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] rename failes if file name contains single quotes

2003-01-31 Thread Jason Wong
On Friday 31 January 2003 16:52, $B%X!<%s(B $B%H!<%^%9(B wrote:
(B> when i try to rename a file with single quote(s) in the
(B> file name, e.g.
(B>
(B> rename("/tmp/foo 'n bar", "/tmp/foobar");
(B>
(B> rename fails with "there is no such file".
(B> whats wrong?
(B
(BYou probably need to escape certain characters such as space and the single 
(Bquote.
(B
(B-- 
(BJason Wong -> Gremlins Associates -> www.gremlins.biz
(BOpen Source Software Systems Integrators
(B* Web Design & Hosting * Internet & Intranet Applications Development *
(B
(B/*
(BI never said all Democrats were saloonkeepers; what I said was all
(Bsaloonkeepers were Democrats.
(B*/
(B
(B
(B-- 
(BPHP General Mailing List (http://www.php.net/)
(BTo unsubscribe, visit: http://www.php.net/unsub.php



[PHP] rename failes if file name contains single quotes

2003-01-31 Thread $B%X!<%s(B $B%H!<%^%9(B
when i try to rename a file with single quote(s) in the
(Bfile name, e.g.
(B
(Brename("/tmp/foo 'n bar", "/tmp/foobar");
(B
(Brename fails with "there is no such file".
(Bwhats wrong?
(B
(Bthanx,
(B
(Bakagisan
(B
(B__
(BDo You Yahoo!?
(BYahoo! BB is Broadband by Yahoo!  http://bb.yahoo.co.jp/
(B
(B
(B-- 
(BPHP General Mailing List (http://www.php.net/)
(BTo unsubscribe, visit: http://www.php.net/unsub.php