in reply to Re: File path with special characters
in thread File path with special characters

Hello again,

Sorry for the lack of details in my question. I am running on WinXP with ActivePerl 5.10.0 build 1004. What I'm doing in my program is to let the user specify a file path using an open dialog and then I try to open the file. The code is appended below.

$data_file = Tkx::tk___getOpenFile(-parent => $mw, -filetypes => [['Da +ta file', '.txt']],-initialdir => "$path\\work\\"); open(DATA_FILE, $data_file); @data = <DATA_FILE>; close(DATA_FILE);

When I do this for a file path containing special characters (for example å,ä and ö, surely more characters will cause problems) the open command failes. Hope this gives you a little more information to work with :)

Replies are listed 'Best First'.
Re^3: File path with special characters
by moritz (Cardinal) on Dec 12, 2008 at 09:34 UTC
    As I said before, it's unlikely that we can solve the problem for you. You have to work with it.

    You should check the Tkx documentation to see what kind of string that dialog returns (a decoded text string, or not), and then consult the documentation of Encode and decide what you have to do with it.

    Read the links I gave you earlier. You have to understand what's going on to get it working.