in reply to File path with special characters
When you read a string from STDIN (or other file handles) in perl, it is handled as binary data. So if the input is in the same character encoding as the file name, it should work. If not, you can try to recode it into the appropriate encoding using [mod://Encode}::from_to.
To do that, you have to know both the character encoding of the input encoding (depending on operating system, possible locales, and the terminal or GUI toolkit you're using) and the output encoding (depending on OS, file system and the API used to interface the OS).
With the sparse informations you've given us we can't guess any of those, and even if you tell us more, in the end you're the only one who can really find out what you need to do.
For a general introduction you can read about character encodings and perl, perluniintro and perlunifaq. None of those will give you a read-made solution, but reading these documents will make you aware of the possibilities and pitfalls.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: File path with special characters
by samuelalfred (Sexton) on Dec 12, 2008 at 09:10 UTC | |
by moritz (Cardinal) on Dec 12, 2008 at 09:34 UTC |