Hi all

My first time with this forum:).

I'm running python 2.4.4 and unicode enabled wxPython on Windows XP.
I'm writing a gui application which requires users to be able to type accented characters easily into a TextCtr. To this end I have built a set of tools on a toolbar which will insert accented characters. The value of the TextCtr is then appended to a data structure consisting of nested lists. Some of the data is then extracted into a separate list which is presented in a ListBox.

Now if I run the application with python.exe it behaves nicely, presenting the list in the ListBox complete with accented characters.

But if I run it with pythonw.exe I get the dreaded 'cannot encode blah, blah, blah. Neither can I run it from Dr.Python (since it runs it with pythonw.exe).

I have included an encoding declaration at the start of the source
# -*- coding: latin-1 -*-

Any ideas what I am missing as, when tested, I really want the application to run without a console.


Thanks

John

What an idiot I am!!!!!

Forget the above. The problem never really existed. I had assumed the problem was occurring in one place when in fact it was happening in a bit of debugging code. I've removed that and everything is fine.

I'll never learn not to make assumptions.

John

I thought that
# -*- coding: iso-8859-15 -*-

was just another way of declaring latin-1.

Should it make a difference?

This question has already been answered. Start a new discussion instead.