How do I convert special chars of passwords typed with CAPSLOCK?

rubo77

If someone has pressed CAPSLOCK while typing the password,

abcXYZ123

will result in

abcXYZ123

(or maybe ABCxyz!"§ on some OS?)

How can I convert this correctly?

with mb_strtolower() I can only convert it all to lowercase.
With:

mb_strtolower('ABCxyz!"§');

the numbers are not restored:

abcxyz!"§
Vladimir Gordienko

just show message about capslock when user entering it and dont care... You cant detect if user use capslock or not in server side.

fast sample how you can detect when user enter char:

$('#password').keypress(function(e) { 
    var s = String.fromCharCode( e.which );
    if ( s.toUpperCase() === s && s.toLowerCase() !== s && !e.shiftKey ) {
        alert('caps is on');
    }

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

How do I convert special UTF-8 chars to their iso-8859-1 equivalent using javascript?

How do I convert a string to a list of chars?

How do I ignore special chars and numbers from my input?

In Gradle how do I reference an imported ant task with special chars?

How do I json_decode string with special chars (" \\ " )

How do I convert a list of chars to a string in purescript

Convert special chars to HTML

How do I convert a classic ActorContext to a typed one

How do i remove the special chars that show as `\uxxx` in python3 string object?

How do I handle special chars in the credentials of the Symfony Mailer component in SMTP transport?

ZSH: How do I echo a program's output to a temp file if the output has newlines and other special chars?

How do I convert UTF-8 special characters in Bash?

How do I convert special characters using java?

How do I convert only the special characters of a String to unicode?

How do I convert Unicode special characters to html entities?

How can I set special chars in the git log --pretty=format?

How Do I convert bytes to ASCII chars, using Oracle PL/SQL

How do i remove chars from a string?

How do I collect chars into a string in C?

How do I get Chrome to remember the passwords?

How do I turn off or repurpose the CAPSLOCK key?

How do I convert an interface{} value to a statically typed value using a function in golang?

How do I convert a dynamically typed object to a type argument <T> in C#?

How to display special chars in html

How to escape special chars powershell

How do I make a strongly typed AuthorizeAttribute

How can I do typed metaprogramming with TypeScript?

How can I convert chars(pointer) to strings in C - to be used in strcmp

sed in AIX script do not work with special chars