X-Git-Url: http://www.wagner.pp.ru/gitweb/?p=oss%2Fcatdoc.git;a=blobdiff_plain;f=src%2Fwriter.c;fp=src%2Fwriter.c;h=c86b6fe84afb229f9b14cb0313cd7c2b47c8484c;hp=5f95ba2fdb3659f09ba1fe8c24e3a508bf89c423;hb=a79f2377217c571396074fccf360e01032cd77bf;hpb=1202f84b0b3c0f7cf474fea44129ce736a3123f1 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--; }