Add setlocale LC_CTYPE
Fix icase searches for 8bit charsets
This commit is contained in:
parent
efce212686
commit
9203a11a55
|
@ -19,6 +19,9 @@
|
|||
|
||||
#include <errno.h>
|
||||
#include <stdio.h>
|
||||
#ifdef __FreeBSD__
|
||||
#include <locale.h>
|
||||
#endif
|
||||
|
||||
#ifndef errno
|
||||
extern int errno;
|
||||
|
@ -606,6 +609,9 @@ main(argc, argv)
|
|||
extern char *optarg;
|
||||
extern int optind;
|
||||
|
||||
#ifdef __FreeBSD__
|
||||
(void) setlocale(LC_CTYPE, "");
|
||||
#endif
|
||||
prog = argv[0];
|
||||
if (prog && strrchr(prog, '/'))
|
||||
prog = strrchr(prog, '/') + 1;
|
||||
|
|
|
@ -46,7 +46,7 @@ extern char *memchr();
|
|||
#define bcopy(s, d, n) memcpy((d), (s), (n))
|
||||
#endif
|
||||
|
||||
#ifdef isascii
|
||||
#if defined(isascii) && !defined(__FreeBSD__)
|
||||
#define ISALNUM(C) (isascii(C) && isalnum(C))
|
||||
#define ISUPPER(C) (isascii(C) && isupper(C))
|
||||
#else
|
||||
|
|
Loading…
Reference in New Issue