mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05:00
dump: Replace control characters with spaces
In DUMP_FUNCTION_SPECIALIZED, use isscreensafe_ucs (for UTF-8) or isscreensafe (for unibyte) to detect control characters, and replace them with spaces. add_document_to_string already did the same.
This commit is contained in:
parent
ee182ced2b
commit
2f0cefffb5
@ -128,7 +128,13 @@ DUMP_FUNCTION_SPECIALIZED(struct document *document, int fd,
|
||||
&& c >= 176 && c < 224)
|
||||
c = frame_dumb[c - 176];
|
||||
|
||||
if (c <= ' ') {
|
||||
if (c == ' '
|
||||
#ifdef DUMP_CHARSET_UTF8
|
||||
|| !isscreensafe_ucs(c)
|
||||
#else
|
||||
|| !isscreensafe(c)
|
||||
#endif
|
||||
) {
|
||||
/* Count spaces. */
|
||||
white++;
|
||||
continue;
|
||||
|
Loading…
Reference in New Issue
Block a user