diff --git a/util/ChangeLog b/util/ChangeLog index dcb21678c..1ae5ac57d 100644 --- a/util/ChangeLog +++ b/util/ChangeLog @@ -1,3 +1,9 @@ +2009-08-18 Werner Koch + + * miscutil.c (print_string2): Loose check for control characters + to better cope with utf-8. The range 0x80..0x9f is nowadays not + anymore accidently used for control charaters. Fixes bug#1103. + 2009-08-11 David Shaw * strgutil.c (string_to_utf8): New function to convert a Latin-1 diff --git a/util/miscutil.c b/util/miscutil.c index 14fdc79c0..f74d3e38b 100644 --- a/util/miscutil.c +++ b/util/miscutil.c @@ -256,7 +256,8 @@ void print_string2( FILE *fp, const byte *p, size_t n, int delim, int delim2 ) { for( ; n; n--, p++ ) - if( *p < 0x20 || (*p >= 0x7f && *p < 0xa0) + if (*p < 0x20 + || *p == 0x7f || *p == delim || *p == delim2 || ((delim || delim2) && *p=='\\')) {