Better encoding of special characters