in reply to find scalar encoding
On Windows you could try to query the current codepage somehow, and hope that the filename is in that codepage (I don't think it's guaranteed though), on Unix systems you could try the current locale - but then again you can't blindly assume that it reflects the encoding of the file name.
If you have a narrow selection of possible encodings, you can use Encode::Guess to determine which one is most likely correct, but it's only a heuristic, and usually doesn't work well on such short strings as file names.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: find scalar encoding
by dHarry (Abbot) on Sep 09, 2008 at 12:55 UTC | |
by Anonymous Monk on Sep 09, 2008 at 13:06 UTC | |
|
Re^2: find scalar encoding
by rastakouair (Initiate) on Sep 09, 2008 at 15:36 UTC |