revised jsdom with encoding