Add string encoding conversion method.