diff -ur libpst-0.6.64.org/src/libpst.c libpst-0.6.64/src/libpst.c --- libpst-0.6.64.org/src/libpst.c 2015-03-09 18:57:46.000000000 +0100 +++ libpst-0.6.64/src/libpst.c 2015-07-02 01:22:36.706070484 +0200 @@ -1835,6 +1835,7 @@ size_t rc; static pst_vbuf *utf16buf = NULL; static pst_vbuf *utf8buf = NULL; + char* mycharset = "iso-8859-1//TRANSLIT//IGNORE"; if (!utf16buf) utf16buf = pst_vballoc((size_t)1024); if (!utf8buf) utf8buf = pst_vballoc((size_t)1024); @@ -1845,7 +1846,12 @@ DEBUG_HEXDUMPC(utf16buf->b, utf16buf->dlen, 0x10); rc = pst_vb_utf16to8(utf8buf, utf16buf->b, utf16buf->dlen); if (rc == (size_t)-1) { - DEBUG_WARN(("Failed to convert utf-16 to utf-8\n")); + DEBUG_WARN(("Failed to convert utf-16 to utf-8, trying 8bit ...\n")); + rc = pst_vb_8bit2utf8(utf8buf, utf16buf->b, utf16buf->dlen-1, mycharset); + free(mo_ptr->elements[x]->data); + mo_ptr->elements[x]->size = strlen(utf8buf->b); + mo_ptr->elements[x]->data = pst_malloc(strlen(utf8buf->b)); + memcpy(mo_ptr->elements[x]->data, utf8buf->b, strlen(utf8buf->b)); } else { free(mo_ptr->elements[x]->data); Kun i libpst-0.6.64/src: Makefile diff -ur libpst-0.6.64.org/src/vbuf.c libpst-0.6.64/src/vbuf.c --- libpst-0.6.64.org/src/vbuf.c 2015-03-09 18:57:46.000000000 +0100 +++ libpst-0.6.64/src/vbuf.c 2015-07-02 01:06:45.686042098 +0200 @@ -218,7 +218,13 @@ char *outbuf = NULL; int myerrno; - if (!unicode_up) return (size_t)-1; // failure to open iconv + if (inbuf[1] != '\0' ) { + DEBUG_WARN(("UTF-16 called, but content probably ISO. Returning ... \n")); + unicode_up = 0; + } else { + DEBUG_WARN(("Decoding UTF-16 content ... \n")); + } + if (!unicode_up) { unicode_up = 1; return (size_t)-1; } // failure to open iconv pst_vbresize(dest, iblen); //Bad Things can happen if a non-zero-terminated utf16 string comes through here