Re: Search text and unicode build

le dahut <[email protected]>
Newsgroups gmane.comp.ide.boa-constructor.user
Message-ID <[email protected]>

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
> 
> 

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.