Ede Wolf listac@nebelschwaden.de schrieb am 21.02.2023 um 16:10 in Nachricht
5fed02ec-1e12-5264-305f-a3f69a335480@nebelschwaden.de:
The same way you would enter Unicode in any other application. This is not
an LDAP- or LDIF-specific question.
- use a terminal and locale that support UTF-8.
- use whatever tools your OS provides for entering Unicode characters.
Probably something named "Unicode character map" or similar.
Thanks again. But my question regards the values for attributes.
Having a ldif file, for the dn I can enter: dn: cn=A \F0\9F\99\82 Test,dc=example,dc=com
It seems the backslash notation is not actually defined for LDIF.
RFC 2849 (LDAP Data Interchange Format) says:
SAFE-STRING = [SAFE-INIT-CHAR *SAFE-CHAR]
SAFE-CHAR = %x01-09 / %x0B-0C / %x0E-7F SAFE-INIT-CHAR = %x01-09 / %x0B-0C / %x0E-1F / %x21-39 / %x3B / %x3D-7F
dn-spec = "dn:" (FILL distinguishedName / ":" FILL base64-distinguishedName) distinguishedName = SAFE-STRING rdn = SAFE-STRING
base64-distinguishedName = BASE64-UTF8-STRING
base64-rdn = BASE64-UTF8-STRING
UTF8-STRING = *UTF8-CHAR
BASE64-CHAR = %x2B / %x2F / %x30-39 / %x3D / %x41-5A / %x61-7A
BASE64-UTF8-STRING = BASE64-STRING
BASE64-STRING = [*(BASE64-CHAR)]
That would literally give me the utf8 smiley icon as part of my dn - provided my font feratures that, of course. So I can use the hex encoding representation to enter any UTF-8 character.
I can even search for that icon, using that hex encoding as search base or part of the search filter.
However, for a value, I cannot do this, and my question is, is there a way at all? This has nothing to do with my console.
For a directorystring attribute (it value), is there any way of entering code points straight into my ldif - be it U+0000 or hex notation - and having the server interpret them, as it works for the dn?
Not copy+paste from the command line, but, again, as encodigs where the ldap server knows, these are to be interpreted. As it does for the dn.
Something like: cn: A \F0\9F\99\82 Test
Just with a syntax that works. If that it possible at all.
Thanks
Ede