Our vBulletin migration is complete.
Welcome vBulletin users! All content and user information from the Micro Focus Forums (vBulletin) site has been migrated to this site. READ MORE.
Anonymous_User Absent Member.
Absent Member.
419 views

Problems with utf-8 texts in searchstrings?


Hi all,

i have noticed a problem when using UTF-8 (well, non-ascii 😉
characters in searchstrings. If i for example throw (sn=Södergren)
(swedish O with umlauts) it will break and return everyone with sn=S*

This is not exactly the expected behaviour and im a bit stumped why
this happens. The LDAP server i question is running at v3 so should work
with UTF-8 all the way. I am using the Novell Ldap directory libraries
and C# to connect.

Anyone got any ideas?

/Henrik


--
HenrikHiB
------------------------------------------------------------------------
HenrikHiB's Profile: http://forums.novell.com/member.php?userid=37222
View this thread: http://forums.novell.com/showthread.php?t=399842

Labels (1)
0 Likes
1 Reply
Anonymous_User Absent Member.
Absent Member.

Re: Problems with utf-8 texts in searchstrings?

Generally this should not be a problem.

I did this without issue:
ldapsearch -H ldap://sa.willeke.com:389 -ZZ -x -D
"cn=jim,dc=willeke,dc=com" -W -b "ou=people,dc=willeke,dc=com" -s sub -a
always -z 1000 "(sn=Ströder)" "givenName" "sn" "objectClass"

dn: cn=stroeder,ou=people,dc=willeke,dc=com
givenName: Michael
sn:: U3Ryw7ZkZXI=

The dstrace shows:
05:08:12 B6FACB90 00000000 FFFFFFFF -1 LDAP:
(192.168.1.51:58346)(0x0020:0x63) Search request:
base: "ou=people,dc=willeke,dc=com"
scope:2 dereference:3 sizelimit:1000 timelimit:0 attrsonly:0
filter: "(sn=Str�der)"
attribute: "givenName"
attribute: "sn"
05:08:12 B6FACB90 00000000 FFFFFFFF -1 LDAP:
(192.168.1.51:58346)(0x0020:0x63) Sending search result entry
"cn=stroeder,ou=people,dc=willeke,dc=com" to connection 0x151d1780
05:08:12 B6FACB90 00000000 FFFFFFFF -1 LDAP:
(192.168.1.51:58346)(0x0020:0x63) Sending operation result 0:"":"" to
connection 0x151d1780

The result comes back as non-ascii so it is base-64 encoded when don on
the command line or if in an LDIF file.

This was done against LDAP Agent for Novell eDirectory 8.8 SP5 (20219.14)

I would guess the code is trying to do something with the filter.

Try doing the same call from the command line and turn on dstrace. (if
on eDirectory)

-jim

On 1/28/2010 10:06 AM, HenrikHiB wrote:
>
> Hi all,
>
> i have noticed a problem when using UTF-8 (well, non-ascii 😉
> characters in searchstrings. If i for example throw (sn=Södergren)
> (swedish O with umlauts) it will break and return everyone with sn=S*
>
> This is not exactly the expected behaviour and im a bit stumped why
> this happens. The LDAP server i question is running at v3 so should work
> with UTF-8 all the way. I am using the Novell Ldap directory libraries
> and C# to connect.
>
> Anyone got any ideas?
>
> /Henrik
>
>

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.