- if (display_charset == NULL) {
- /* The user did not specify a display charset, so use
- current setting and see if the content will need to be
- converted. */
- char *charset = content_charset (ct);
-
- if (! check_charset (charset, strlen (charset))) {
- int unused = 0;
- if (convert_charset (ct, get_charset (), &unused) == 0) {
- *file = ct->c_cefile.ce_file;
- } else {
- return NOTOK;
- }
- }
- } else {
- /* The user requested display with a specific charset. */
+ /* Using current locale, see if the content needs to be converted. */
+
+ /* content_charset() cannot return NULL. */
+ char *charset = content_charset (ct);
+
+ if (! check_charset (charset, strlen (charset))) {