From: Takaaki Tateishi Date: 2004-01-05T23:00:46+09:00 Subject: Re: libldap-ruby and \000 > How can I add binary data containing the \0 character? Could you try the following code? entry = [ LDAP.mod(LDAP::LDAP_MOD_ADD, 'objectClass', [ 'top', 'strongAuthenticationUser', 'person' ]), LDAP.mod(LDAP::LDAP_MOD_ADD, 'cn', [ "test" ]), LDAP.mod(LDAP::LDAP_MOD_ADD, 'sn', [ "test" ]), LDAP.mod(LDAP::LDAP_MOD_ADD | LDAP::LDAP_MOD_BVALUES, 'userCertificate;binary', [ binaryData ]) ] Now I think that it is helpful for us to convert {'key1'=>data1,...} into [LDAP.mod(...|LDAP::LDAP_MOD_BVALUES, 'key1', data1),...]. In all liklihood, I will improve the conversion method so that we can simply add strings containing '\000' in the notation {...}. Thanks, -- Takaaki Tateishi