in reply to Re: How to detect the OS's current encoding?
in thread How to detect the OS's current encoding?

I'm afraid making a customized file dialog would not get the encoding problem around, for we still needs to know the OS's current encoding to 'decode' pathname into UTF-8 in order to display them correctly in Tk widgets. Anyway, Tk 804.xx always using UTF-8 string internally.
  • Comment on Re^2: How to detect the OS's current encoding?

Replies are listed 'Best First'.
Re^3: How to detect the OS's current encoding?
by zentara (Cardinal) on Mar 01, 2007 at 18:13 UTC
    I'm still in a state of semi-confusion with all of this encoding stuff. But my understanding of the problem I had, was that the program that saved the file, didn't use the right encoding when it saved the file, so when my local system tried to read it, I would see a 2 letter set, in place of the unicode character. graff's method of decoding it, would automagically convert the filenames to be recognized by my system.

    It isn't hard to make your own custom file selector dialog, and if you do, it would be easy to run decode on the files first. Maybe you could sub-class getOpenFile, to do a decode routine first?

    See Re: problems with extended ascii characters in filenames if you are interested.

    And there is the often given tip, which I don't quite understand

    $Tk::encodeFallback=1

    Then again, I probably don't even understand your problem, :-)


    I'm not really a human, but I play one on earth. Cogito ergo sum a bum