X-Git-Url: http://www.wagner.pp.ru/gitweb/?a=blobdiff_plain;f=src%2Fwriter.c;h=c86b6fe84afb229f9b14cb0313cd7c2b47c8484c;hb=7de410970cd2916482178d730b64aef013b0567a;hp=5f95ba2fdb3659f09ba1fe8c24e3a508bf89c423;hpb=c83cd8895214b3d0a6481123a7f3f126bb9f0a06;p=oss%2Fcatdoc.git diff --git a/src/writer.c b/src/writer.c index 5f95ba2..c86b6fe 100644 --- a/src/writer.c +++ b/src/writer.c @@ -58,7 +58,8 @@ void out_char(const char *chunk) { if (p==outputbuffer) { /*worst case - nowhere to wrap. Will use brute force */ int i = wrap_margin; - if (from_unicode == to_utf8) { + if (target_charset == NULL) { + /* NULL target_charest means UTF-8 */ /* go back to start of nearest utf-8 character */ while(i>0 && (outputbuffer[i] & 0xC0) == 0x80) i--; }