* [sisyphus] LDAP + русский текст.
@ 2002-11-04 8:35 Денис Якимов
2002-11-04 8:46 ` Alexey V. Lubimov
0 siblings, 1 reply; 6+ messages in thread
From: Денис Якимов @ 2002-11-04 8:35 UTC (permalink / raw)
To: Sisyphus
Здравствуйте.
Извините, что немного не по тематике рассылки.
Но уж больно худая у меня ситуация. Заплутал я совсем в проблеме
импорта русского текста, да и вообще, бинарного кода в базу LDAP.
Имеем честно сгенереный test.ldif:
----------
dn: uid=polisharik13, ou=people, dc=den,dc=yar,dc=ru
cn:
w7DDj8OMw4nDh8OSw4HDhiDDsMOPw4zDicOHw5LDgcOGw4/Dl8OJw54gw7vDgcOSw4nDi8OPw5c=
sn;binary: w7vDgcOSw4nDi8OPw5c=
objectclass: top
objectclass: person
objectclass: inetOrgPerson
objectclass: organizationalPerson
mail: polisharik@mail.ru
title: {binary}w7DDj8Oew4XDlMOOw5nDiiDDlMOFw5PDlMOFw5I=
----------
Здесь видны мои потуги с тремя вариантами импорта русского текста
(завернутого сначала в utf8, затем в base64).
Вариант без указания типа поля приводит к тому, что LDAP-клиент в чистую
показывает строку в исходном виде, то есть как w7DDj8...OPw5c=
Что, естественно, меня не устраивает.
При попытке указать тип {bynary) приводит к тому же.
Вариант с sn;binary приводит к ошибке, что данный тип для данного поля
неприемлем.
А теперь вопрос: как же импортировать в базу LDAP данные на русском?
Намекните, что ль.
--
С Уважением,
Денис Якимов
старший инженер ИЦ УВД Ярославской области, тел: (0852) 27-93-36
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [sisyphus] LDAP + русский текст.
2002-11-04 8:35 [sisyphus] LDAP + русский текст Денис Якимов
@ 2002-11-04 8:46 ` Alexey V. Lubimov
2002-11-04 10:20 ` Денис Якимов
0 siblings, 1 reply; 6+ messages in thread
From: Alexey V. Lubimov @ 2002-11-04 8:46 UTC (permalink / raw)
To: sisyphus
намекал же вроде:
> Имеем честно сгенереный test.ldif:
> ----------
> dn: uid=polisharik13, ou=people, dc=den,dc=yar,dc=ru
> cn: w7DDj8OMw4nDh8OSw4HDhiDDsMOPw4zDicOHw5LDgcOGw4/Dl8OJw54gw7vDgcOSw4nDi8OPw5c=
cn::w7DDj8OMw4nDh8OSw4HD
еще одно двоеточие надо ставить, если данные завернуты в base64
--
С уважением, Алексей Любимов avl@cad.ru
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [sisyphus] LDAP + русский текст.
2002-11-04 8:46 ` Alexey V. Lubimov
@ 2002-11-04 10:20 ` Денис Якимов
2002-11-04 10:34 ` Alexey V. Lubimov
0 siblings, 1 reply; 6+ messages in thread
From: Денис Якимов @ 2002-11-04 10:20 UTC (permalink / raw)
To: Sisyphus
В Пнд, 04.11.2002, в 11:46, Alexey V. Lubimov написал:
>
> cn::w7DDj8OMw4nDh8OSw4HD
>
> еще одно двоеточие надо ставить, если данные завернуты в base64
Упс. Действительно. Я уже пробовал и с двоеточием. Оказывается, что
LDAPExplorer не раскодирует поля...
Спасибо.
Теперь видно, что там есть что-то похожее на русский, но еще не совсем
ясно, какой русский.
В perl-скрипте строка кодируется так:
$cn_value = encode_base64(encode_utf8('Полиграф Полиграфович Шариков'));
Пока что вместо русского какая-то мешанина из различных символов:
Evolution показывает комбинации из символа'_'.
TheBat - полную ахинею.
CQ - пустую строку.
Хмм. Как говорится, ничего не понимаю.
Премного благодарен за любой дельный совет.
--
С Уважением,
Денис Якимов
старший инженер ИЦ УВД Ярославской области, тел: (0852) 27-93-36
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [sisyphus] LDAP + русский текст.
2002-11-04 10:20 ` Денис Якимов
@ 2002-11-04 10:34 ` Alexey V. Lubimov
2002-11-04 10:40 ` Alexey V. Lubimov
2002-11-04 12:52 ` Денис Якимов
0 siblings, 2 replies; 6+ messages in thread
From: Alexey V. Lubimov @ 2002-11-04 10:34 UTC (permalink / raw)
To: sisyphus
> Теперь видно, что там есть что-то похожее на русский, но еще не совсем
> ясно, какой русский.
>
> В perl-скрипте строка кодируется так:
>
> $cn_value = encode_base64(encode_utf8('Полиграф Полиграфович Шариков'));
мне надо было согнать данные из cvs от outlook в ldiff
я просто конвертнул все строки в utf-8 с помощью iconv, а далее перловым скриптом уже загнал их в ldif
перловый скрипт (переделка из довольно известного скрипта для перевода cvs в ldiff )лежит на ftp.atmsk.ru/download
--
С уважением, Алексей Любимов avl@cad.ru
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [sisyphus] LDAP + русский текст.
2002-11-04 10:34 ` Alexey V. Lubimov
@ 2002-11-04 10:40 ` Alexey V. Lubimov
2002-11-04 12:52 ` Денис Якимов
1 sibling, 0 replies; 6+ messages in thread
From: Alexey V. Lubimov @ 2002-11-04 10:40 UTC (permalink / raw)
To: sisyphus
Еще здорово взять gq, забить им в ldap объект на русском и сделать экспорт в ldiff
и сделать ту же вещь своим скриптом.
и сравнивать различия в строках.
gq все делает, как положено.
--
С уважением, Алексей Любимов avl@cad.ru
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [sisyphus] LDAP + русский текст.
2002-11-04 10:34 ` Alexey V. Lubimov
2002-11-04 10:40 ` Alexey V. Lubimov
@ 2002-11-04 12:52 ` Денис Якимов
1 sibling, 0 replies; 6+ messages in thread
From: Денис Якимов @ 2002-11-04 12:52 UTC (permalink / raw)
To: Sisyphus
В Пнд, 04.11.2002, в 13:34, Alexey V. Lubimov написал:
>
> перловый скрипт (переделка из довольно известного скрипта
> для перевода cvs в ldiff )лежит на ftp.atmsk.ru/download
>
Господа, полный путь (URL) до жизненно важного скрипта не подскажете?
С I-net'ом сейчас напряженка, может хоть через www4mail вытяну... :(
--
С Уважением,
Денис Якимов
старший инженер ИЦ УВД Ярославской области, тел: (0852) 27-93-36
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2002-11-04 12:52 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-11-04 8:35 [sisyphus] LDAP + русский текст Денис Якимов
2002-11-04 8:46 ` Alexey V. Lubimov
2002-11-04 10:20 ` Денис Якимов
2002-11-04 10:34 ` Alexey V. Lubimov
2002-11-04 10:40 ` Alexey V. Lubimov
2002-11-04 12:52 ` Денис Якимов
ALT Linux Sisyphus discussions
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/sisyphus/0 sisyphus/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 sisyphus sisyphus/ http://lore.altlinux.org/sisyphus \
sisyphus@altlinux.ru sisyphus@altlinux.org sisyphus@lists.altlinux.org sisyphus@lists.altlinux.ru sisyphus@lists.altlinux.com sisyphus@linuxteam.iplabs.ru sisyphus@list.linux-os.ru
public-inbox-index sisyphus
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.sisyphus
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git