@@ -788,9 +788,14 @@ void printdates(FILE *fp, struct header *hp, int year, int month, struct emailin
788
788
&& (month == -1 || month_of_datenum (em -> date ) == month )
789
789
&& !em -> is_deleted
790
790
&& (!subdir_email || subdir_email -> subdir == em -> subdir )) {
791
-
792
- subject = (set_i18n ) ? em -> subject : convchars (em -> subject , em -> charset );
793
- name = (set_i18n ) ? em -> name : convchars (em -> name ,em -> charset );
791
+
792
+ #ifdef HAVE_ICONV
793
+ subject = convchars (em -> subject , "utf-8" );
794
+ name = convchars (em -> name , "utf-8" );
795
+ #else
796
+ subject = convchars (em -> subject , em -> charset );
797
+ name = convchars (em -> name , em -> charset );
798
+ #endif
794
799
795
800
if (set_indextable ) {
796
801
startline = "<tr><td>" ;
@@ -830,11 +835,9 @@ void printdates(FILE *fp, struct header *hp, int year, int month, struct emailin
830
835
set_fragment_prefix , em -> msgnum , set_fragment_prefix , em -> msgnum ,
831
836
name ,
832
837
break_str , date_str , endline );
833
-
834
- if (!set_i18n ) {
835
- free (subject );
836
- free (name );
837
- }
838
+
839
+ free (subject );
840
+ free (name );
838
841
}
839
842
printdates (fp , hp -> right , year , month , subdir_email , prev_date_str );
840
843
}
@@ -2689,9 +2692,15 @@ void printsubjects(FILE *fp, struct header *hp, char **oldsubject,
2689
2692
&& (month == -1 || month_of_datenum (hp -> data -> date ) == month )
2690
2693
&& !hp -> data -> is_deleted
2691
2694
&& (!subdir_email || subdir_email -> subdir == hp -> data -> subdir )) {
2692
- subject = (set_i18n ) ? hp -> data -> unre_subject : convchars (hp -> data -> unre_subject , hp -> data -> charset );
2693
- name = (set_i18n ) ? hp -> data -> name : convchars (hp -> data -> name ,hp -> data -> charset );
2694
-
2695
+
2696
+ #ifdef HAVE_ICONV
2697
+ subject = convchars (hp -> data -> unre_subject , "utf-8" );
2698
+ name = convchars (hp -> data -> name , "utf-8" );
2699
+ #else
2700
+ subject = convchars (hp -> data -> subject , hp -> data -> charset );
2701
+ name = convchars (hp -> data -> name , hp -> data -> charset );
2702
+ #endif
2703
+
2695
2704
if (strcasecmp (hp -> data -> unre_subject , * oldsubject )) {
2696
2705
if (set_indextable ) {
2697
2706
fprintf (fp ,
@@ -2732,10 +2741,8 @@ void printsubjects(FILE *fp, struct header *hp, char **oldsubject,
2732
2741
set_fragment_prefix , hp -> data -> msgnum , date_str , endline );
2733
2742
* oldsubject = hp -> data -> unre_subject ;
2734
2743
2735
- if (!set_i18n ) {
2736
- free (subject );
2737
- free (name );
2738
- }
2744
+ free (subject );
2745
+ free (name );
2739
2746
}
2740
2747
printsubjects (fp , hp -> right , oldsubject , year , month , subdir_email );
2741
2748
}
0 commit comments