Fix encoding in non-utf8 pages