add simple auto detecting text encoding