ruby-ldap/ruby-net-ldap — pull request #64 by lfu (2013-04-22 18:59:37+00:00)
Title: Let Net::BER::BerIdentifiedString fall back if string cannot be encoded.

Binary data in objectSid leading to "invalid byte sequence in UTF-8" error. Not sure if it is the best solution, but it solved the issue for me.