Fixed utf-8 encode/decode to to fix issue with special characters on preview page.