fix pages encoding