I am trying to use changePassword.php to change the password of a user (who has forgotten his password). The name of the user has the spanish character tilde-n in it (UTF-8 \xF1). However, I can't figure out how to specify this character in the --user= value. When I try to use \xF1, the maintenance script sees it as the literal character string "xF1". If I use \xF1, the script sees the literal character sring "\xF1". I can't figure out how to get the script to accept the unicode string encoding.
Any ideas?
On 18/12/11 06:52, Dan Nessett wrote:
I am trying to use changePassword.php to change the password of a user (who has forgotten his password). The name of the user has the spanish character tilde-n in it (UTF-8 \xF1). However, I can't figure out how to specify this character in the --user= value. When I try to use \xF1, the maintenance script sees it as the literal character string "xF1". If I use \xF1, the script sees the literal character sring "\xF1". I can't figure out how to get the script to accept the unicode string encoding.
Any ideas?
What about writing ñ in a utf-8 terminal?
On Sat, Dec 17, 2011 at 9:52 PM, Dan Nessett dnessett@yahoo.com wrote:
I am trying to use changePassword.php to change the password of a user (who has forgotten his password). The name of the user has the spanish character tilde-n in it (UTF-8 \xF1). However, I can't figure out how to specify this character in the --user= value. When I try to use \xF1, the maintenance script sees it as the literal character string "xF1". If I use \xF1, the script sees the literal character sring "\xF1". I can't figure out how to get the script to accept the unicode string encoding.
If you have a normal UTF-8 terminal, just type or cut-n-paste the "ñ" however you normally would. If for some reason this isn't available (sounds like you're expecting an 8-bit locale on your terminal?), I'd recommend using the user-id with the --userid parameter instead. :)
-- brion
On Sun, 18 Dec 2011 18:44:38 -0800, Brion Vibber wrote:
On Sat, Dec 17, 2011 at 9:52 PM, Dan Nessett dnessett@yahoo.com wrote:
I am trying to use changePassword.php to change the password of a user (who has forgotten his password). The name of the user has the spanish character tilde-n in it (UTF-8 \xF1). However, I can't figure out how to specify this character in the --user= value. When I try to use \xF1, the maintenance script sees it as the literal character string "xF1". If I use \xF1, the script sees the literal character sring "\xF1". I can't figure out how to get the script to accept the unicode string encoding.
If you have a normal UTF-8 terminal, just type or cut-n-paste the "ñ" however you normally would. If for some reason this isn't available (sounds like you're expecting an 8-bit locale on your terminal?), I'd recommend using the user-id with the --userid parameter instead. :)
-- brion _______________________________________________ MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Thanks, but it appears the --userid parameter appears in MW versions later than 1.16.5. Anyway, I was able to locate a utf-8 enabled terminal and got the password changed.
On Sat, 17 Dec 2011 21:52:27 -0800, Dan Nessett dnessett@yahoo.com wrote:
I am trying to use changePassword.php to change the password of a user (who has forgotten his password). The name of the user has the spanish character tilde-n in it (UTF-8 \xF1). However, I can't figure out how to specify this character in the --user= value. When I try to use \xF1, the maintenance script sees it as the literal character string "xF1". If I use \xF1, the script sees the literal character sring "\xF1". I can't figure out how to get the script to accept the unicode string encoding.
Any ideas?
Quite simply, this will depend entirely on your shell. Character escapes just like 'asdf' vs "asdf" vs asdf and things like {foo,bar} and * are all handled at the shell level so the answer is whatever method your shell uses. In some cases you might actually be able to just copy and paste the unicode character in.
If all else fails in your attempts to figure out how to get your shell to pass the unicode in changePassword.php accepts a --userid parameter you can use instead of the username.
mediawiki-l@lists.wikimedia.org