title: Javascript validate user input against desired character set (encoding)
body: <p>The scenario is as follows:  </p>
  
  <p>User copies text from web site using Win-1252 encoding for its character set.  This text is then sent to a database that I control with a character set of ISO-8859-1(this is a subset of Win-1252).  Is there a mechanism within Javascript to inform the user that they are trying to insert "invalid" characters into the system?  Preference if it can highlight said characters.  </p>
  
  <p>The general form of this problem is that a system A(sending system) has a Set of encodings defined as <code>AsubE</code>  and a different system B(the accepting system) has a set of encodings defined as <code>BsubE</code>.  When <code>BsubE</code> is inside the universe of <code>AsubE</code> it is not a problem.  The question is about when <code>BsubE</code> is not a subset of <code>AsubE</code> how can we validate the input from the user.</p>