Re: utf8 issues in Scintilla(again)
| From: | Fernando Correa da Conceição | Date: | Wed, 05 Jul 2006 00:36:34 +0000 |
| Subject: | Re: utf8 issues in Scintilla(again) | ||
| References: | 1 2 | Groups: | php.gtk.dev |
| Request: | Send a blank email to php-gtk-dev+get-3192@lists.php.net to get a copy of this message | ||
I make another discover, why there is an error for me and not for you, maybe
this is important.
I use it to show a file that is read. The file is saved as iso 8859-1. So i
save the same file as utf8 and there is not the error, so you linux uses utf8
as encoding, and this is why there is not the error to you. Because without
see, you are passing a utf8 encoded value to set_text().
We need make the override. The scintilla must receive the value in local
charset, not in utf8. This is a fact.
We must decide is what chararcter enconding is send in the php var to
scintilla,
I think that we must send the value from php variable without any change, and
if need, the user do this change before send it to scintilla. This is why.
Scintilla has suport for using a charset defined by the user, like iso
8859-1, utf8, and japanese. So the user can send a value in the character set
that he wants and set scintilla to work with it. As in your case, you can set
scintilla to work with utf8.
There is other way too. Make the scintilla expect that the value send to it is
in utf8, and in it´s constructor set scintilla to work with utf8, and when
return a value from scintilla, return as utf8, so the user can convert from
any charset that it is using to utf8 and when get a value, convert it from
utf8.
So after all this, we must decide:
1. Which charset will be in a variable when scintilla gets a value from
user (utf8 or local)?
2. Which charset will be in a variable when scintilla returns a value to
user?
I can make all changes that is necessary(because I really want scintiila
working), only tell me what is your decision.
PS1:
More one thing. I discover that using:
$text = mb_convert_encoding($text, "utf8", "ISO-8859-1");
In my code before using $scintilla->set_text($text) solves the error for me,
this can be a solution for everyone not using utf8.
PS2:
Can you make the docs for scintilla, mozembed and sourceview? At last the
prototipes for the functions. I will be happy in make it complete, but i need
a skeleton to start with.
PS3:
Can you build a windows version of scintilla? and mozenbed too if you can!
Thanks a lot
Fernando Correa da Conceição
_______________________________________________________
Novidade no Yahoo! Mail: receba alertas de novas mensagens no seu celular. Registre seu aparelho
agora!
http://br.mobile.yahoo.com/mailalertas/