moving to unicode problems ...

hello,

I just switched from P2.4 to P2.5,
and decided to switch also from Ansi to unicode,
as I read somewhere that wxPython will not support Ansi in the future.

Writing strings to infile, sometimes seems to work correctly, sometimes it doesn't.
For example write the AUI layout with SavePerspective (),
gives me:

Panesx = (u'l', u'a', u'y', u'o', u'u', u't', u'2', u'|', u'n', u'a', u'm', u'e', u'=', u'S', u'N', u'2', u'0', u';', u'c', u'a', u'p', u't', u'i', u'o', u'n', u'=', u'S', u'i', u'g', u'n', u'a', u'l', u' ', u'W', u'o', u'r', u'k', u'B', u'e', u'n', u'c',

where it was in Ansi:
Panes = 'layout2|name=SN20;caption=Signal WorkBench (Plotting);state=17152;dir=5;layer=0;row=0;pos=0;prop=100000;bestw=100;besth=40;minw=100;minh=40;maxw=-1;maxh=-1;floatx=-1;floaty=-1;floatw=-1;floath=-1|dock_size(5,0,0)=102|'

Besides that the unicode string is completely unreadable for human,
the LoadPerspective seems to have trouble with it too :wink:

Is there a simple way to prevent the weird unicode notation written to the inifile ?

Why are some strings written normally to my inifiles,
and some in single-character unicode ?

What other problems can I expect, going from Ansi to Unicode, with my old programs and configuration / inifiles ?

Hopes that someone can enlighten me.
thanks,
Stef Mientki

Sorry,
I found the problem,
I have a thin layer on top of ConfigObj,
which didn't detect the unicode, so it made a tuple of a unicode string :frowning:

cheers,
Stef

Stef Mientki wrote:

ยทยทยท

hello,

I just switched from P2.4 to P2.5,
and decided to switch also from Ansi to unicode,
as I read somewhere that wxPython will not support Ansi in the future.

Writing strings to infile, sometimes seems to work correctly, sometimes it doesn't.
For example write the AUI layout with SavePerspective (),
gives me:

Panesx = (u'l', u'a', u'y', u'o', u'u', u't', u'2', u'|', u'n', u'a', u'm', u'e', u'=', u'S', u'N', u'2', u'0', u';', u'c', u'a', u'p', u't', u'i', u'o', u'n', u'=', u'S', u'i', u'g', u'n', u'a', u'l', u' ', u'W', u'o', u'r', u'k', u'B', u'e', u'n', u'c',

where it was in Ansi:
Panes = 'layout2|name=SN20;caption=Signal WorkBench (Plotting);state=17152;dir=5;layer=0;row=0;pos=0;prop=100000;bestw=100;besth=40;minw=100;minh=40;maxw=-1;maxh=-1;floatx=-1;floaty=-1;floatw=-1;floath=-1|dock_size(5,0,0)=102|'

Besides that the unicode string is completely unreadable for human,
the LoadPerspective seems to have trouble with it too :wink:

Is there a simple way to prevent the weird unicode notation written to the inifile ?

Why are some strings written normally to my inifiles,
and some in single-character unicode ?

What other problems can I expect, going from Ansi to Unicode, with my old programs and configuration / inifiles ?

Hopes that someone can enlighten me.
thanks,
Stef Mientki

_______________________________________________
wxpython-users mailing list
wxpython-users@lists.wxwidgets.org
http://lists.wxwidgets.org/mailman/listinfo/wxpython-users