Filename containing French characters ?
C. P. Ghost
cpghost at cordula.ws
Tue May 24 17:53:16 UTC 2011
On Mon, May 23, 2011 at 5:50 PM, Modulok <modulok at gmail.com> wrote:
> Short answer, use a glob pattern. Assume I have a file named 'à fichier.txt':
Very good hints indeed.
I once had a directory full of files with strange characters, so I wrote a
little program that replaced every non-ascii char in a filename with its
hex-encoding (like this: "Hello%20World%21", % escape char), so
I could manipulate them with the shell. As long as the expanded
filenames didn't hit the MAXNAMELEN limit in <sys/dirent.h>, it
I could dig this C program out of old archives, but I guess that it is
faster to rewrite it on the fly, or even script it with sh(1), tr(1), awk(1),
and find(1)... ;-)
Alternatively to such a run-once-in-a-while program, I could also
imagine a file system layer on top of existing file systems that
would do this conversion automatically, but that's harder to code,
and harder to debug (kernel mode!).
Cordula's Web. http://www.cordula.ws/
More information about the freebsd-questions