[Project_owners] Supporting multibyte characters

Jaap Haitsma jaap at haitsma.org
Sat May 8 16:03:11 EDT 2004


Erwan Loisant wrote:
> 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).
> 
I form an URL out of the word that searches for that specific word on a 
specific site and load that URL in a new tab. I guess that's what's 
going wrong. How do I convert it then to the appropriate encoding and 
how do I obtain the encoding of the page where I selected the word?

Thanks

Jaap


More information about the Project_owners mailing list