[Project_owners] Supporting multibyte characters

Erwan Loisant erwanloisant at yahoo.co.jp
Sat May 8 21:29:58 EDT 2004


My extension ( http://moji.mozdev.org ) is also a dictionnary. I also 
used  getSelection and it seems like Gecko always convert any multibyte 
character into Unicode.

What do you do with the selection then ? Do you send it to a dictionary 
site ? In this case, maybe the string should be converted back to the 
encoding the site is expecting (for Japanese it could be euc-jp, 
iso-2022-jp or sjis).

Jaap Haitsma wrote:

> Hi,
>
> I got a request to support multi byte characters of a japanese user of 
> dictionary search. Does anybody know what I should adapt in my code.
> Up till now I'm getting a text selection by calling
>
> var focusedWindow = document.commandDispatcher.focusedWindow;
> selection = 
> focusedWindow.__proto__.getSelection.call(focusedWindow).toString();
>
> Thanks
>
> Jaap
> _______________________________________________
> Project_owners mailing list
> Project_owners at mozdev.org
> http://mozdev.org/mailman/listinfo/project_owners
>


-- 
Erwan Loisant - Ph.D. student
Tokyo Metro U. / Univ. Nantes
http://www.loisant.org




More information about the Project_owners mailing list