How do you know what encoding the user is inputing into the browser?
问题 I read Joel's article about character sets and so I'm taking his advice to use UTF-8 on my web page and in my database. What I can't understand is what to do with user input. As Joel says, "It does not make sense to have a string without knowing what encoding it uses." But how do I know what encoding the user input string uses? If I have <input type="text" name="atextfield" > on my page, how do I know what encoding I'm getting from the user? What if the user puts in some special ASCII symbol,