diff -uN wv-1.0.2/text.c.ORG wv-1.0.2/text.c --- wv-1.0.2/text.c.ORG Tue Jan 20 10:06:43 2004 +++ wv-1.0.2/text.c Mon Sep 6 16:23:57 2004 @@ -1934,11 +1934,13 @@ } /* Debugging aid: */ +#if 0 if (char16 >= 0x80) { printf ("[%x]", char16); return (1); } +#endif return (0); } @@ -2157,7 +2159,7 @@ #define BUF_COPY(d,s) str_copy(d,sizeof(d),s) char * -wvConvertStylename(char *stylename, char *outputtype) +wvConvertStylename(char *stylename, char *outputtype, char *orgcharset) { static char cached_outputtype[36]; static iconv_t iconv_handle = (iconv_t)-1; @@ -2182,11 +2184,16 @@ /**FIXME: donīt know if ISO-8859-1 is really the correct **charset for style names with eg umlauts. **/ +#if 0 iconv_handle = iconv_open(outputtype, "ISO-8859-1"); +#else + if(orgcharset==NULL) orgcharset="ISO-8859-1"; + iconv_handle = iconv_open(outputtype, orgcharset); +#endif if(iconv_handle == (iconv_t)-1) { wvError(("iconv_open fail: %d, cannot convert %s to %s\n", - errno, "ISO-8859-1", outputtype)); + errno, orgcharset, outputtype)); return stylename; } diff -uN wv-1.0.2/wv.h.ORG wv-1.0.2/wv.h --- wv-1.0.2/wv.h.ORG Mon May 12 19:23:07 2003 +++ wv-1.0.2/wv.h Mon Sep 6 16:25:30 2004 @@ -2939,7 +2939,8 @@ int wvConvertUnicodeToHtml (U16 char16); int wvConvertUnicodeToXml (U16 char16); - char *wvConvertStylename(char *stylename, char *outputtype); + char *wvConvertStylename(char *stylename, char *outputtype, + char *orgcharset); int wvConvertUnicodeToLaTeX (U16 char16); U16 wvConvertSymbolToUnicode (U16 char16); U16 wvConvertMTExtraToUnicode (U16 char16); diff -uN wv-1.0.2/wvConfig.c.ORG wv-1.0.2/wvConfig.c --- wv-1.0.2/wvConfig.c.ORG Sun Jul 14 22:20:07 2002 +++ wv-1.0.2/wvConfig.c Mon Sep 6 16:20:53 2004 @@ -1735,7 +1735,8 @@ wvAppendStr (&mydata->retstring, pap->stylename); #else wvAppendStr(&mydata->retstring, - wvConvertStylename(pap->stylename, mydata->charset)); + wvConvertStylename(pap->stylename, mydata->charset, + wvAutoCharset(mydata->ps))); #endif mydata->currentlen = strlen (mydata->retstring); break;