Trying to restore the correct encoding