unified error handling for the case of a charset conversion error