chaitu chaitu
asked on
javascript toUpperCase() giving problem for utf-8
for UTF-8 i am using encodeURIComponent method ;its working fine for all cases except some characters like alt159 when i use javascript toUpperCase() its coming box character
encodeURIComponent(documen t.getEleme ntById("XX XXX").valu e.toUpperC ase())
encodeURIComponent(documen
FOr validation purposes, you could apply an onblur event or onkeyup, which would perform a Replace on a range on Alt Codes in the Target Value. Meaning that when you come to perform the toUpperCase method, no character is there that you are unprepared for. A lit of these ranges can be found here
http://www.tomwilson.com/david/accents/Alt_key_chars.doc
http://www.tomwilson.com/david/accents/Alt_key_chars.doc
ASKER
when i enter alt159 it will come as ƒ;
when user enter any characters i am converted into upperCase.when user entered above special character also i am doing same thing;then its giving problem.that special character turns into square bracket.at that time what is the remedy
when user enter any characters i am converted into upperCase.when user entered above special character also i am doing same thing;then its giving problem.that special character turns into square bracket.at that time what is the remedy
ASKER
i am not doing validation;i am preparing url here in javascript and send it to another page;
ASKER
"hich would perform a Replace on a range on Alt Codes in the Target Value"
how can i perform a a Replace on a range on Alt Codes ??
how can i perform a a Replace on a range on Alt Codes ??
ASKER
first tell me Is alt159 is special character or UTF character
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Is this now answered too?
Andrew