Skip to content
Snippets Groups Projects
Commit 75c15237 authored by Kurt Zeilenga's avatar Kurt Zeilenga
Browse files

Fix 5 char long UTF-8 chars (ITS#860)

parent ca5ccd45
No related branches found
No related tags found
No related merge requests found
......@@ -29,7 +29,7 @@
#include "ldap_defaults.h"
#undef ISASCII
#define ISASCII(uc) ((uc) < 0x100)
#define ISASCII(uc) ((uc) < 0x80)
#undef UCS4_INVALID
#define UCS4_INVALID 0x80000000U
......@@ -163,7 +163,7 @@ int ldap_ucs4_to_utf8( ldap_ucs4_t c, char *buf )
p[len++] = 0x80 | ( (c >> 6) & 0x3f );
p[len++] = 0x80 | ( c & 0x3f );
} else if( c < 0x400000 ) {
} else if( c < 0x4000000 ) {
p[len++] = 0xf8 | ( c >> 24 );
p[len++] = 0x80 | ( (c >> 18) & 0x3f );
p[len++] = 0x80 | ( (c >> 12) & 0x3f );
......@@ -266,7 +266,7 @@ int ldap_utf8_copy( char* dst, const char *src )
/*
* UTF-8 ctype routines
* Only deals with characters < 0x100 (ie: US-ASCII)
* Only deals with characters < 0x80 (ie: US-ASCII)
*/
int ldap_utf8_isascii( const char * p )
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment