> Message: 1
> Date: Fri, 18 Aug 2006 14:28:13 +0200
> From: "Arvid Andersson" <u57vs8 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.
_______________________________________________
Greasemonkey mailing list
Greasemonkey mozdev.org
http:
//mozdev.org/mailman/listinfo/greasemonkey
|