Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Main
Synchronet
Commits
067556d7
Commit
067556d7
authored
Feb 23, 2022
by
Rob Swindell
💬
Browse files
Strip CP437 "graphics" characters in prep_file_desc()
If the extended description is UTF-8, first convert it to CP437.
parent
a710f6ff
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
src/sbbs3/filedat.c
src/sbbs3/filedat.c
+8
-4
No files found.
src/sbbs3/filedat.c
View file @
067556d7
...
...
@@ -30,6 +30,7 @@
#include "scfglib.h"
#include "sauce.h"
#include "crc32.h"
#include "utf8.h"
/* libarchive: */
#include <archive.h>
...
...
@@ -1082,10 +1083,13 @@ char* prep_file_desc(const char* ext, char* dest)
char
*
src
;
char
*
buf
=
strdup
(
ext
);
if
(
buf
==
NULL
)
src
=
(
char
*
)
ext
;
else
{
src
=
buf
;
strip_ctrl
(
src
,
src
);
return
NULL
;
src
=
buf
;
strip_ctrl
(
src
,
src
);
if
(
!
str_is_ascii
(
src
))
{
if
(
utf8_str_is_valid
(
src
))
utf8_to_cp437_inplace
(
src
);
strip_cp437_graphics
(
src
,
src
);
}
FIND_ALPHANUMERIC
(
src
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment