<div dir="ltr"><div>Hello,</div><div><br></div><div>Can eldap handle Unicode strings (e.g. passwords) in general?<br><br></div><div>I'm not in a position to test it myself as of this moment, and so I looked into the source code.<br><br></div><div>- the eldap docs say the API mostly receives the built-in `string()` type as input(s)[1]<br></div><div>- the `string()` type is defined as being a list of `char()`, which in return is defined as a Unicode codepoint[2]<br></div><div>- eldap uses a module named ELDAPv3 to encode LDAP messages[3]</div><div>- ELDAPv3 appears to be generated from an ASN.1-defined protocol[4]<br></div><div>- under said protocol, most messages appear to transport "OCTET STRING"s[5]</div><div>- there's also an LDAPString[6] type, which is nevertheless also defined as an "OCTET STRING"[7]<br></div><div>- finally, there's a separate notion of character strings under the docs for the asn1 app[8], which is not used in eldap<br></div><div><br></div><div>With all of this in mind: would eldap handle Unicode strings? Or would I have to convert them to UTF-8 encoded byte lists first? <br><br>(The later notion not being ideal, since they would be neither Unicode strings nor UTF-8 binaries, but something in-between which is unsupported, I presume, by both the `string` and `unicode` modules.)<br></div><div><br>[1]: <a href="http://erlang.org/doc/man/eldap.html#simple_bind-3">http://erlang.org/doc/man/eldap.html#simple_bind-3</a><br>[2]: <a href="https://erlang.org/doc/reference_manual/typespec.html#types-and-their-syntax">https://erlang.org/doc/reference_manual/typespec.html#types-and-their-syntax</a><br>[3]: <a href="https://github.com/erlang/otp/blob/OTP-23.3.1/lib/eldap/src/eldap.erl#L1008">https://github.com/erlang/otp/blob/OTP-23.3.1/lib/eldap/src/eldap.erl#L1008</a><br>[4]: <a href="https://github.com/erlang/otp/blob/OTP-23.3.1/lib/eldap/asn1/ELDAPv3.asn1">https://github.com/erlang/otp/blob/OTP-23.3.1/lib/eldap/asn1/ELDAPv3.asn1</a><br>[5]: <a href="https://github.com/erlang/otp/blob/OTP-23.3.1/lib/eldap/asn1/ELDAPv3.asn1#L148-L155">https://github.com/erlang/otp/blob/OTP-23.3.1/lib/eldap/asn1/ELDAPv3.asn1#L148-L155</a><br>[6]: <a href="https://github.com/erlang/otp/blob/OTP-23.3.1/lib/eldap/asn1/ELDAPv3.asn1#L42-L43">https://github.com/erlang/otp/blob/OTP-23.3.1/lib/eldap/asn1/ELDAPv3.asn1#L42-L43</a><br>[7]: Expected to be encoded in UTF-8 no less<br>[8]: <a href="http://erlang.org/doc/apps/asn1/asn1_getting_started.html#character-strings">http://erlang.org/doc/apps/asn1/asn1_getting_started.html#character-strings</a></div><div><br>--<br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr">Guilherme<br></div></div></div></div></div></div></div></div>