Solving encoding problems