McMillan / Tk / encoding problem

Thomas Korb Doc at goodweb.de
Fri Oct 4 07:20:55 EDT 2002


Hi! I have a strange problem with an application written in Python 
using Tk as GUI. I do use the Tk text-widget (as a simple editor)
and wrote some encoding functions for transforming iso-8859-1 to
Unicode and the other way round (when loading text to the widget
or when pasting from the clipboard etc. etc.).

When running the application as a normal Python-script, everything 
works just fine. But after building a standalone executable (for MS 
Windows) with Gordon McMillan's Installer (newest version 5.x) this
does not work any more. E.g. when saving text from the text-widget
to a file, I end up with a Unicode-file and not with an iso-8859-1
encoded file. (This is always an issue when using Tk; but my transforming-
functions are OK (on Linux and Windows) when running the script directly
via Python; the problem only occurs when using McMillan's Installer.)

I am *not* using the new --ascii switch of McMillan's installer; 
moreover, I think the problem comes from the Tk-side of the script 
(as some tests with 'pure Python' applications indicate).

Does someone know this problem? Any help highly appreciated!

(I googled for this problem and found one person who had the same
problem when using the text-widget for a non iso-8859-1 language.
But I could not find a solution to the problem.)

-- 
________________________________________________________________________
Dr. Thomas Korb  /  GOODWEB.DEsign  /  www.goodweb.de  /  Doc at goodweb.de



More information about the Python-list mailing list