(copy_ascii_no_funny, copy_utf8_no_funny)
(copy_utf8_to_ascii_no_funny): Don't consider newline funny. This fixes output filtering broken in rev. 1.17.
This commit is contained in:
parent
2f847f874d
commit
a38ffacc37
1 changed files with 6 additions and 6 deletions
|
@ -507,8 +507,8 @@ copy_ascii_no_funny(char *dst, char *src)
|
|||
|
||||
p = dst;
|
||||
while ((ch = *src++)) {
|
||||
if ((ch < 0x20 && ch != '\t') || ch == 0x7f)
|
||||
; /* ignore control */
|
||||
if ((ch < 0x20 && ch != '\t' && ch != '\n') || ch == 0x7f)
|
||||
; /* ignore funny control */
|
||||
else if (ch > 0x7f)
|
||||
*p++ = '?'; /* replace non-ASCII */
|
||||
else
|
||||
|
@ -536,8 +536,8 @@ copy_utf8_no_funny(char *dst, char *src)
|
|||
p = dst;
|
||||
while ((ch = *src++)) {
|
||||
/* FIXME do the right thing for malformed and overlong sequences */
|
||||
if ((ch < 0x20 && ch != '\t') || ch == 0x7f)
|
||||
; /* ignore control */
|
||||
if ((ch < 0x20 && ch != '\t' && ch != '\n') || ch == 0x7f)
|
||||
; /* ignore funny control */
|
||||
else
|
||||
*p++ = ch;
|
||||
}
|
||||
|
@ -563,8 +563,8 @@ copy_utf8_to_ascii_no_funny(char *dst, char *src)
|
|||
p = dst;
|
||||
while ((ch = *src++)) {
|
||||
/* FIXME do the right thing for malformed and overlong sequences */
|
||||
if ((ch < 0x20 && ch != '\t') || ch == 0x7f)
|
||||
; /* ignore control */
|
||||
if ((ch < 0x20 && ch != '\t' && ch != '\n') || ch == 0x7f)
|
||||
; /* ignore funny control */
|
||||
else if (ch > 0x7f) {
|
||||
*p++ = '?'; /* replace non-ASCII */
|
||||
while ((*src++ & 0xc0) == 0x80) ;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue