Re: [Boa Constr] Search text and unicode build
Status: Beta
Brought to you by:
riaan
From: le d. <le....@la...> - 2008-02-26 16:41:26
|
Werner F. Bruhin a écrit : > Hi, > > le dahut wrote: >> It are normal .py files. >> >> I made some tests and it appears if there are some "caractères >> accentués". If I have : >> """ >> coucou >> psqfqsfq >> coucou >> sdfs fsdf sdf sd fcoucou sdfsd >> sdkj fmqlkj fkqmsj fkq coucou sdfsq >> éé >> sdlkfjds fsd >> sd f >> q >> f qf coucou >> sdfds coucousdfsd >> """ >> >> and I search for "coucou", it is correctly highlighted before the >> characters "éé". After the blue highlight is 2 characters before where >> it should be. >> It seems that the shift corresponds with the number of accentuated >> characters. > Yes, I see this some strange things if the source contains special > characters, probably some issue with the highlighting causing a problem > with the unicode escaped character which follows. > > Would be interesting to see if other editors which are based on > wxStyledTextCtrl show the same problem. >> I have modified C:\Python25\Lib\site.py line 370 with : >> encoding = "iso8859-1" > I would suggest to use a sitecustomize.py in your python root folder for > this, with the following content: > > import sys > sys.setdefaultencoding('utf-8') Why utf-8 ? windows is iso8859-1 encoded isn't it ? > > Werner > > |