From fb34f5b8bdc2d167db59faa8fd808e5e88fb6e82 Mon Sep 17 00:00:00 2001 From: kkalev Date: Sun, 13 Oct 2002 20:18:17 +0000 Subject: [PATCH] * Add a string encoder for greek * If general_decode_normal_attributes is set then encode attributes in lib/ldap/change_info. In the near future language specific user attributes will be added in the change info and new user pages. Remove comments from admin.conf about the change info page not working if this directive is used. * When spliting cn in lib/ldap/create_user.php3 limit the split to 2 new elements not 3. --- Changelog | 6 ++++++ conf/admin.conf | 2 -- lib/lang/el/utf8.php3 | 42 +++++++++++++++++++++++++++++++++++++++ lib/ldap/change_info.php3 | 22 ++++++++++++++++++-- lib/ldap/create_user.php3 | 2 +- 5 files changed, 69 insertions(+), 5 deletions(-) diff --git a/Changelog b/Changelog index 7c24093..023c406 100644 --- a/Changelog +++ b/Changelog @@ -1,3 +1,9 @@ +Ver 1.61: +* Add a string encoder for greek +* If general_decode_normal_attributes is set then encode attributes in lib/ldap/change_info. In the near future + language specific user attributes will be added in the change info and new user pages. Remove comments from + admin.conf about the change info page not working if this directive is used. +* When spliting cn in lib/ldap/create_user.php3 limit the split to 2 new elements not 3. Ver 1.60: * Use require_once when including lib/functions.php3 in lib/sql * In the buttons toolbar Edit User should not be clickable. diff --git a/conf/admin.conf b/conf/admin.conf index f9cc061..c281e99 100644 --- a/conf/admin.conf +++ b/conf/admin.conf @@ -10,8 +10,6 @@ general_prefered_lang_name: Greek # # Uncomment this if normal attributes (not the ;lang-xx ones) in ldap # are utf8 encoded. -# Changing user attribute through user_info will *not* work in that case, -# but you will at least be able to see user attributes. # #general_decode_normal_attributes: yes # diff --git a/lib/lang/el/utf8.php3 b/lib/lang/el/utf8.php3 index 8048ea7..6d2f173 100644 --- a/lib/lang/el/utf8.php3 +++ b/lib/lang/el/utf8.php3 @@ -1,4 +1,34 @@ "€", "~A"=>"", "~B"=>"‚", "~C"=>"ƒ", "~D"=>"„", "~E"=>"…", + "~F"=>"†", "~G"=>"‡", "~H"=>"ˆ", "~I"=>"‰", "~J"=>"Š", "~K"=>"‹", + "~L"=>"Œ", "~M"=>"", "~N"=>"Ž", "~O"=>"", "~P"=>"", "~Q"=>"‘", + "~R"=>"’", "~S"=>"“", "~T"=>"”", "~U"=>"•", "~V"=>"–", "~W"=>"—", + "~^"=>"ž", "~_"=>"Ÿ", "| "=>" ", "¡"=>"ʽ", "¢"=>"ʼ", "£"=>"£", + "¤"=>"�", "¥"=>"�", "¦"=>"¦", "§"=>"§", "¨"=>"¨", "©"=>"©", + "ª"=>"�", "«"=>"«", "¬"=>"¬", "­"=>"­", "®"=>"�", "¯"=>"―", + "°"=>"°", "±"=>"±", "²"=>"²", "³"=>"³", "´"=>"΄", "µ"=>"΅", + "¶"=>"Ά", "·"=>"·", "¸"=>"Έ", "¹"=>"Ή", "º"=>"Ί", "»"=>"»", + "¼"=>"Ό", "½"=>"½", "¾"=>"Ύ", "¿"=>"Ώ", "À"=>"ΐ", "Á"=>"Α", + "Â"=>"Β", "Ã"=>"Γ", "Ä"=>"Δ", "Å"=>"Ε", "Æ"=>"Ζ", "Ç"=>"Η", + "È"=>"Θ", "É"=>"Ι", "Ê"=>"Κ", "Ë"=>"Λ", "Ì"=>"Μ", "Í"=>"Ν", + "Î"=>"Ξ", "Ï"=>"Ο", "Ð"=>"Π", "Ñ"=>"Ρ", "Ò"=>"�", "Ó"=>"Σ", + "Ô"=>"Τ", "Õ"=>"Î¥", "Ö"=>"Φ", "×"=>"Χ", "Ø"=>"Ψ", "Ù"=>"Ω", + "Ú"=>"Ϊ", "Û"=>"Ϋ", "Ü"=>"ά", "Ý"=>"έ", "Þ"=>"ή", "ß"=>"ί", + "à"=>"ΰ", "á"=>"α", "â"=>"β", "ã"=>"γ", "ä"=>"δ", "å"=>"ε", + "æ"=>"ζ", "ç"=>"η", "è"=>"θ", "é"=>"ι", "ê"=>"κ", "ë"=>"λ", + "ì"=>"μ", "í"=>"ν", "î"=>"ξ", "ï"=>"ο", "ð"=>"π", "ñ"=>"ρ", + "ò"=>"ς", "ó"=>"σ", "ô"=>"τ", "õ"=>"υ", "ö"=>"φ", "÷"=>"χ", + "ø"=>"ψ", "ù"=>"ω", "ú"=>"ϊ", "û"=>"ϋ", "ü"=>"ό", "ý"=>"ύ", + "þ"=>"ώ", "~X"=>"˜", "~Y"=>"™", "~Z"=>"š", "~["=>"›", "~]"=>"" + ); + + return $k; +} + function init_decoder() { $k = array( @@ -28,6 +58,18 @@ function init_decoder() return $k; } +function encode_string($line,$k) +{ + for($i=0;$i