Sanitize multibyte UTF-8 input to prevent MySQL errors