diff options
Diffstat (limited to 'jnlib')
-rw-r--r-- | jnlib/ChangeLog | 6 | ||||
-rw-r--r-- | jnlib/stringhelp.c | 3 |
2 files changed, 7 insertions, 2 deletions
diff --git a/jnlib/ChangeLog b/jnlib/ChangeLog index d09834419..c7bef6086 100644 --- a/jnlib/ChangeLog +++ b/jnlib/ChangeLog @@ -1,3 +1,9 @@ +2008-06-26 Werner Koch <[email protected]> + + * stringhelp.c (print_sanitized_buffer2): Loose check for control + characters to better cope with utf-8. The range 0x80..0x9f is + nowadays not anymore accidently used for control charaters. + 2008-06-13 Werner Koch <[email protected]> * dotlock.c: Reformat code and implement locking for W32. diff --git a/jnlib/stringhelp.c b/jnlib/stringhelp.c index 028750528..50e869cea 100644 --- a/jnlib/stringhelp.c +++ b/jnlib/stringhelp.c @@ -406,9 +406,8 @@ print_sanitized_buffer2 (FILE *fp, const void *buffer, size_t length, for (; length; length--, p++, count++) { - /* Fixme: Check whether *p < 0xa0 is correct for utf8 encoding. */ if (*p < 0x20 - || (*p >= 0x7f && *p < 0xa0) + || *p == 0x7f || *p == delim || *p == delim2 || ((delim || delim2) && *p=='\\')) |