check if string contains invalid characters javascript





Will this catch all invalid (non utf encoded) characters? Does any of you have a better (easier) solution?Other times, you wouldnt get anything, getParameter() returns null. Say you can check for "?", what happens your query string contains valid "?" ? As you see I entered letters from different language but for some reason the code cant read it and return true is there a way maybe to get string split it to array and then use it? or different code or something I need to add/ download. Thank you in advance. Solution to How to check if a string This tutorial will show you how to check if string contains specific character using javascript?