Hello!
PythonCard is the best python gui solution "on the
market" imho, but the lack of decent multilingual support
is missing from at least the resource editor application: it
looses every accented character typed in the property
editor so i have to manually edit the rsrc file afterwards
and convert the strings to unicode (the editor reads back
the file containing unicode strings with no problems, but
the chars are lost during the save process). This can be a
big problem during the update of an existing gui.
Logged In: YES
user_id=228025
Thanks for the report. I assume that the problem is with the
resourceOutput.py module, but the propertyEditor.py module may also
have some issues. In particular, look at line 91 in resourceEditor/
modules/resoureOutput.py
# KEA 2002-07-07
# what other Unicode strings do we need to deal with above?
#print key, value, type(value)
if isinstance(value, (str, unicode)):
if isinstance(value, unicode):
value = value.encode('ascii', 'ignore')
Logged In: YES
user_id=1027085
Commenting out these two lines resolved my problem:
if isinstance(value, unicode):
value = value.encode('ascii', 'ignore')
The question is: what other functions had i messed up with this
change? As for now i cannot see any.
Logged In: YES
user_id=1027085
Oh i see. I am using wxWindows unicode build. This is perfectly
ok, but if i would switch to the non-unicode build, i expect i
would get tons of exceptions.
This is not a problem for me and after all everyone should use
the wx unicode build, i see no reason in doing otherwise. I
think back in 2002 this was an issue, but now it is not.
Logged In: NO
It seems that wxWidgets only support unicode on Windows
platforms, so...
Can you detect whether the underlying wxPython is a unicode
build? If no, just mention it in the document is ok for me,
marking two lines in the source is easy.
Or maybe
import sys
if sys.getdefaultencoding() == 'ascii':
if isinstance(value, unicode):
value = value.encode('ascii', 'ignore')
will do.
Logged In: NO
I noticed the same problem too with the latest version of
PythonCard for Windows, at least for buttons and textfields.
It doesn't appear to affect menu items though. Will try
commenting out the two lines as suggested by b5sg33.
Sani Woi (saniwoi at gmail.com)