in reply to Something to do with text encoding?
One issue I see with your code is that you're not quotemeta-ing $local_dir in
$fileName =~ s{$local_dir(.+)}{\.$1};
To be safe you should quote the meta characters in $local_dir with either quotemeta or the \Q and \E escapes:
$fileName =~ s{\Q$local_dir\E(.+)}{\.$1};
It is possible that it could be a filename encoding issue (a quick google search suggests that MacOS uses Unicode for file paths.) Can you determine what code-point (i.e. character ordinal) the apostrophe is in your file names? It possibly could be a non-ASCII character.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Something to do with text encoding?
by russelj9 (Initiate) on Feb 13, 2008 at 18:43 UTC | |
|
Re^2: Something to do with text encoding?
by russelj9 (Initiate) on Feb 13, 2008 at 17:10 UTC |