Revert deleting of @charset in INPUT plugin

Use @charset to correct encoding property of a String object if it presents. Then check whether encoding property of String object is UTF-8. If not, call String:encode() to convert to UTF-8.