Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
openldap
OpenLDAP
Commits
2504f29a
Commit
2504f29a
authored
Oct 23, 2000
by
Kurt Zeilenga
Browse files
Fix IS ASCII checks. Should be < 0x80 (0100), not < 0x100.
parent
52402fa7
Changes
2
Hide whitespace changes
Inline
Side-by-side
include/ldap_pvt_uc.h
View file @
2504f29a
...
...
@@ -82,7 +82,7 @@ LDAP_F (char *) ldap_utf8_strpbrk( const char* str, const char *set);
LDAP_F
(
char
*
)
ldap_utf8_strtok
(
char
*
sp
,
const
char
*
sep
,
char
**
last
);
/* Optimizations */
#define LDAP_UTF8_ISASCII(p) ( * (const unsigned char *) (p) < 0x
10
0 )
#define LDAP_UTF8_ISASCII(p) ( * (const unsigned char *) (p) < 0x
8
0 )
#define LDAP_UTF8_CHARLEN(p) ( LDAP_UTF8_ISASCII(p) \
? 1 : ldap_utf8_charlen((p)) )
#define LDAP_UTF8_OFFSET(p) ( LDAP_UTF8_ISASCII(p) \
...
...
libraries/libldap/utf-8.c
View file @
2504f29a
...
...
@@ -29,7 +29,7 @@
#include
"ldap_defaults.h"
#undef ISASCII
#define ISASCII(uc) ((uc) < 0x
10
0)
#define ISASCII(uc) ((uc) < 0x
8
0)
/*
* Basic UTF-8 routines
...
...
@@ -264,7 +264,7 @@ int ldap_utf8_copy( char* dst, const char *src )
/*
* UTF-8 ctype routines
* Only deals with characters < 0x
10
0 (ie: US-ASCII)
* Only deals with characters < 0x
8
0 (ie: US-ASCII)
*/
int
ldap_utf8_isascii
(
const
char
*
p
)
...
...
Write
Preview
Supports
Markdown
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