[Greasemonkey] Re: Problem with international Chars
(David *) Frenkiel
dfl.proxy at gmail.com
Sat Aug 19 01:33:27 EDT 2006
> Message: 1
> Date: Fri, 18 Aug 2006 14:28:13 +0200
> From: "Arvid Andersson" <u57vs8 at hotmail.com>
> Subject: [Greasemonkey] Login script, problem with international chars
> and privacy concerns
>
> Hello.
>
> I am new to greasemonkey, I am trying to write a script that will
> automatically log in to a website that requires a username and a password.
...
> var username = document.getElementById("navbar_username");
> username.value = "sample_uname";
> var password = document.getElementsByName("vb_login_password");
> password[0].value = "sample_pword";
>
> However, my username contains swedish characters and they become garbled if
> I enter them this way. I also tried replacing them with html code ("ö")
> but that did not work either. Is there a way to specify the character
> encoding for a userscript? Perhaps that would solve the problem.
>
Arvid, I had the same problem with Hebrew characters. My solution was
to escape them, either in the js console or in a helper page that I
wrote, put the escaped string in the script or in a gm_setValue and
then unescape it before it's used.
More information about the Greasemonkey
mailing list