struggling with data encoding issues in mysql