1
0
mirror of https://github.com/gophernicus/gophernicus.git synced 2024-12-04 14:46:37 -05:00

Merge pull request #40 from fosslinux/utf8-charset

change default charset to utf-8
This commit is contained in:
fosslinux 2019-08-07 09:00:39 +10:00 committed by GitHub
commit c1153f5faa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -215,7 +215,7 @@ size_t strlcat(char *dst, const char *src, size_t siz);
#define DEFAULT_CGI "/cgi-bin/"
#define DEFAULT_USERDIR "public_gopher"
#define DEFAULT_WIDTH 67
#define DEFAULT_CHARSET US_ASCII
#define DEFAULT_CHARSET UTF_8
#define MIN_WIDTH 33
#define MAX_WIDTH 200
#define UNKNOWN_ADDR "unknown"

View File

@ -118,6 +118,7 @@ void parse_args(state *st, int argc, char *argv[])
case 'w': st->out_width = atoi(optarg); break;
case 'o':
if (sstrncasecmp(optarg, "UTF-8") == MATCH) st->out_charset = UTF_8;
if (sstrncasecmp(optarg, "US-ASCII") == MATCH) st->out_charset = US_ASCII;
if (sstrncasecmp(optarg, "ISO-8859-1") == MATCH) st->out_charset = ISO_8859_1;
break;