diff options
Diffstat (limited to 'src/htsparse.c')
-rw-r--r-- | src/htsparse.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/htsparse.c b/src/htsparse.c index 4868819..1619041 100644 --- a/src/htsparse.c +++ b/src/htsparse.c @@ -718,9 +718,21 @@ int htsparse(htsmoduleStruct * str, htsmoduleStructExtended * stre) { strncpy(s, a, b - a + 1); *(s + (b - a) + 1) = '\0'; } + + // Decode title with encoding + if (str->page_charset_ != NULL + && *str->page_charset_ != '\0') { + char *const sUtf = + hts_convertStringToUTF8(s, (int) strlen(s), + str->page_charset_); + if (sUtf != NULL) { + strcpy(s, sUtf); + free(sUtf); + } + } + // Body fprintf(makeindex_fp, template_body, tempo, s); - } } } |