fixed py3k in php (utf8 to utf16be conversion)
fixed page number replacement in py3k (due utf16be)