Automatic UTF-8 detection for chat