another attempt to find out when character ecoding goes wrong