fixes for charset encodings