[閒聊] LDAP Server 用中文

看板FreeBSD作者 (ing)時間19年前 (2006/09/05 23:41), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/4 (看更多)
環境 : FreeBSD 6.1 , openldap 2.3 照著 Oreilly 書上的 perl script key 進去, 結果 search 出來的資料,中文的部分都變成一堆亂碼。 用 ldapsearch 跟 slapcat 出來的資料也都是這樣。 google 了半天,查到說原來 ldapsearch 跟 slapcat 出來的時候, 中文字會被 Base64 encode 過 ... 得自己用 perl , java , c 之類的去解... ----以上是心得,以下是碎碎念還待解決的問題...---- 但是 perl 的 Net::LDAP::LDIF 是用 write() method 直接輸出, 也不能把 MIME::Base64::decode 直接套在 search 出來的 entry 上 於是現在暫時解決的方法是先輸出到檔案,再讀出來做轉換 ... 再試看看有什麼辦法好了.....Orz -- And they... Will dance if they want to dance Please brother take a chance You know they're gonna go Which way they wanna go All we know is that we don't know What is gonna be Please brother let it be Life on the other hand won't let you understand Why we're all part of the masterplan _ -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 220.134.244.196
文章代碼(AID): #14_Ph3cY (FreeBSD)
文章代碼(AID): #14_Ph3cY (FreeBSD)