2 に答える
if you want to remove all symbols except basic latin just apply a regular expression like
str = str.replace(/[\u0080-\uFFFF]+/g, "");
See this list of unicode characters to choose which characters you need to accept or not
First, please make sure you absolutely cannot work with those "problematic" symbols. Clean modern program should correctly understand input in any language.
As for your request to remove anything unreadable, it is better to specify what you want to leave instead, since F. Calderan's example won't remove any extra Unicode symbols above specified FFFF position. So, considering you only want ASCII:
str = str.replace(/[^\u0000-\u007F]+/g, "");