develooper Front page | perl.wxperl.users | Postings from July 2009

Re: STC and unicode issue in Padre

Thread Previous | Thread Next
From:
Carsten Zandecki
Date:
July 4, 2009 13:45
Subject:
Re: STC and unicode issue in Padre
Message ID:
4A4FBF3C.2040803@mediaminds.de
Hi there,
i remember this behaviour and use the following solution.

Herbert Breuning told me to change the codepage to UTF-8, which first 
doesn't worked for me.
But in the meantime I found out that i had to set the codepage for each 
scintilla document. It is not enough to set codepage only for the 
scintilla control - i think.

So i set the codepage directly after changing the scintilla document 
pointer (or maybe, it is enough just to set the codepage after creating 
a document - which i haven't tested yet ... ).

This works for me:

$self->{Editor}->AddRefDocument($doc);
$self->{Editor}->SetDocPointer($self->{Buffer}[$page][0]);
$self->{Editor}->ReleaseDocument($self->{Buffer}[$page][0]);

$self->{Editor}->SetCodePage(65001);

After that you just have to ensure that your file data is UTF-8.

Hope it helps ...

Greetz,
Carsten Zandecki ...

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About