String.fromCharCode & CharacterSets
Posted
by jAndy
on Stack Overflow
See other posts from Stack Overflow
or by jAndy
Published on 2010-04-22T06:16:39Z
Indexed on
2010/04/22
6:23 UTC
Read the original article
Hit count: 263
JavaScript
|jQuery
Hi Folks,
I recently tried to mirror some input within input(text) fields. Using
String.fromCharCode(event.which)
for instance, translates all 'standard' characters correctly. Well it translates them all to uppercase, but that you can easily catch by looking up the shift key aswell.
My Problem is, it can't translate characters like dots, commas, questionmarks etc. First guess was that I have to define a character encoding set, but that does not seem to help. Maybe it'm completly off?
Kind Regards
--Andy
© Stack Overflow or respective owner