[PyKDE] Re: [Patch] QScintilla , UTF-8, eric

Serge sergeyssv at mail.ru
Fri Dec 20 13:34:01 GMT 2002


On Thursday 19 December 2002 17:25, Martin v. Löwis wrote:
> Serge <sergeyssv at mail.ru> writes:
> > 1. Code window in eric does not accept cyrillic characters
> > 2. It also does not display properly cyrillic UTF-8 characters
>
> Please try the attached patch. It implements PEP 263 for Eric3,
> putting the QScintilla widget into UTF-8 mode.
>
> Notice that you will need to add an encoding declaration to your
> files, e.g.
>
> # -*- coding: utf-8 -*-
>
> or
>
> # -*- coding: koi8-r -*-
>
> depending on what encoding you use in your files; if you have an
> UTF-8 BOM in the file, no further declaration is necessary.
>
> Regards,
> Martin

Thanks to all. Now all things works fine.
Martin, there is a small bug in your patch
See line 43 in the function encode :
 coding = get_coding(self, text)

encode is not a member of any class  and  it does not have declare 
'self' attribute/variable (get_coding also :) ) so I just remove it.

Regards,
	Serge.








More information about the PyQt mailing list