Bug 8278 - DirectorySearch/LDAP filter: german umlauts do not work
Summary: DirectorySearch/LDAP filter: german umlauts do not work
Status: NEW
Alias: None
Product: Class Libraries
Classification: Mono
Component: System (show other bugs)
Version: unspecified
Hardware: All All
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
Depends on:
Reported: 2012-11-08 03:22 UTC by sbhwhd
Modified: 2012-11-08 03:24 UTC (History)
2 users (show)

See Also:
Is this bug a regression?: ---
Last known good build:


Description sbhwhd 2012-11-08 03:22:24 UTC
Hi all.

I have created an LDAPBrowser using MonoDevelop and GTK#.

I have discoverd, that filtering for german umlauts does not work, if I use my LDAPBrowser with mono;
on the other hand: if I use my LDAPBrowser on windows with .net-runtime (not mono), german umlauts work fine.

So, this is clearly a bug in the mono runtime.

I did some further debugging and analysis.

So I have discovered, that mono just encapsulates the Novell LDAP libraries, which you can get here: ftp://sdk.provo.novell.com/ndk/ldapcsharp/ldapcsharp/ But I couldn't find out, which version.

Anyhow: a small test showed, that the latest available version from Novell (2.1.11) already fixed this problem - more than 3 years ago!

Further debugging showed me, where the bug is:

The old line
Array.Copy((System.Array) SupportClass.ToByteArray(utf8Bytes), 0, (System.Array)SupportClass.ToByteArray( octets), iOctets, utf8Bytes.Length);

just must be changed to
Array.Copy((System.Array) (utf8Bytes), 0, (System.Array) octets, iOctets, utf8Bytes.Length);

In the file "RfcFilter.cs", this was the only update between the oldest Novell LDAP version (V2.0)
and the latest Novell LDAP version (V2.1.11).

So, please just update this one line, and the bug will be gone!

Btw: Perhaps it would be a good idea, to update all the LDAP classes ...

Note You need to log in before you can comment on or make changes to this bug.