List Info

Thread: Problem with international Chars




Problem with international Chars
user name
2006-08-18 21:33:27
> Message: 1
> Date: Fri, 18 Aug 2006 14:28:13 +0200
> From: "Arvid Andersson" <u57vs8hotmail.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 ("&ouml;")
> 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
Greasemonkeymozdev.org
http:
//mozdev.org/mailman/listinfo/greasemonkey
[1]

about | contact  Other archives ( Real Estate discussion Medical topics )