detect encoding before decode dic file
fix debug message