Index: /extensions/LCAS/trunk/admin/template/global.tpl
===================================================================
--- /extensions/LCAS/trunk/admin/template/global.tpl	(revision 8564)
+++ /extensions/LCAS/trunk/admin/template/global.tpl	(revision 8565)
@@ -26,9 +26,9 @@
   {rdelim}
 {rdelim}
-$(document).ready(function() 
+jQuery(document).ready(function() 
     {ldelim}
-      $("#sorting")
+      jQuery("#sorting")
       .tablesorter({ldelim}sortList:[[3,0]], headers: {ldelim} 1: {ldelim} sorter: false {rdelim}, 4: {ldelim} sorter: false {rdelim}, 5: {ldelim} sorter: false {rdelim} {rdelim} {rdelim})
-      .tablesorterPager({ldelim}container: $("#pager"), positionFixed: false, size: 20, totalPages: 0{rdelim});
+      .tablesorterPager({ldelim}container: jQuery("#pager"), positionFixed: false, size: 20, totalPages: 0{rdelim});
     {rdelim} 
 );
Index: /extensions/LCAS/trunk/include/LCAS_replacement_set.inc.php
===================================================================
--- /extensions/LCAS/trunk/include/LCAS_replacement_set.inc.php	(revision 8565)
+++ /extensions/LCAS/trunk/include/LCAS_replacement_set.inc.php	(revision 8565)
@@ -0,0 +1,598 @@
+<?php
+
+// This file sets the replacement characters which must be used with plugin
+// LCAS (Logon Case and Accents Sensitivity).
+// For each case (case insensitivity, accents insensitivity, or both case and
+// accents insensitivity), the table associates one replacement character (or
+// one combination of replacement characters, but only one), to one or more
+// characters that are equivalent within the considered case.
+//
+// That is: (examples given for characters y, c, æ and œ)
+// +------------------+-----------------+----------------------------------+
+// |       If         |   character(s)  |     ... must be used in          |
+// |       ...        |       ...       |   replacement of character(s)    |
+// |                  | (only one entry |             ...                  |
+// |                  |  is possible)   |   (several entries possible)     |
+// +==================+=================+==================================+
+// |     case is      |             'y' => 'Y'                             |
+// |   insensitive    |             'ý' |  'Ý'                             |
+// |                  |             'ÿ' |  'Ÿ'                             |
+// |                  |             'ỳ' |  'Ỳ'                             |
+// |                  |             'ỵ' |  'Ỵ'                             |
+// |                  |             'ỷ' |  'Ỷ'                             |
+// |                  |             'ỹ' |  'Ỹ'                             |
+// |                  |             'ŷ' |  'Ŷ'                             |
+// |                  |             'c' |  'C'                             |
+// |                  |             'ç' |  'Ç'                             |
+// |                  |             'ć' |  'Ć'                             |
+// |                  |             'ĉ' |  'Ĉ'                             |
+// |                  |             'ċ' |  'Ċ'                             |
+// |                  |             'č' |  'Č'                             |
+// |                  |            'ae' |  'æ Æ'                           |
+// |                  |            'aé' |  'ǽ Ǽ'                           |
+// |                  |            'oe' |  'œ Œ'                           |
+// +------------------+-----------------+----------------------------------+
+// |   accents are    |             'y' => 'ý ÿ ỳ ỵ ỷ ỹ ŷ'                 |
+// |   insensitive    |             'Y' |  'Ý Ÿ Ỳ Ỵ Ỷ Ỹ Ŷ'                 |
+// |                  |             'c' |  'ç ć ĉ ċ č'                     |
+// |                  |             'C' |  'Ç Ć Ĉ Ċ Č'                     |
+// |                  |            'ae' |  'ǽ'                             |
+// |                  |            'AE' |  'Ǽ'                             |
+// |                  |            'ae' |  'æ'                             |
+// |                  |            'AE' |  'Æ'                             |
+// |                  |            'oe' |  'œ'                             |
+// |                  |            'OE' |  'Œ'                             |
+// +------------------+-----------------+----------------------------------+
+// | case AND accents |             'y' => 'Y ý Ý ÿ Ÿ ỳ Ỳ ỵ Ỵ ỷ Ỷ ỹ Ỹ ŷ Ŷ' |
+// | are insensitive  |             'c' |  'C ç Ç ć Ć ĉ Ĉ ċ Ċ č Č'         |
+// |                  |            'ae' |  'æ Æ Ǽ ǽ'                       |
+// |                  |            'oe' |  'œ Œ'                           |
+// +------------------+-----------------+----------------------------------+
+//
+// You can create your own character replacement set, by defining in
+// ./local/config/config.inc.php :
+//
+// $conf['LCAS_replacement_set'][0] = array(
+//   '§§' => '1 2 3 4',
+// );
+//
+// As seen in the example table, in the code above, "§§" should be replaced by
+// the replacement character(s). It can be more than one character, but it
+// must represent only ONE entry. In "1 2 3 4", each figure should be replaced
+// by a character that needs to be considered equivalent to the
+// character(s) replacing "§§". But each character replacing a figure of
+// "1 2 3 4" MUST be a UNIQUE character. Characters here are separated by a
+// space.
+
+  if (!isset($conf['LCAS_replacement_set']))
+   $conf['LCAS_replacement_set'] = array();
+  
+  // 0 : personalized
+  
+  $conf['LCAS_replacement_set'][1] = array(
+  // 1 : case insensitive, accents sensitive
+    
+  // Latin
+    
+    'a'  => 'A',
+    'à'  => 'À',
+    'â'  => 'Â',
+    'á'  => 'Á',
+    'ã'  => 'Ã',
+    'ä'  => 'Ä',
+    'å'  => 'Å',
+    'ā'  => 'Ā',
+    'ă'  => 'Ă',
+    'ą'  => 'Ą',
+    'ǻ'  => 'Ǻ',
+    'ạ'  => 'Ạ',
+    'ả'  => 'Ả',
+    'ấ'  => 'Ấ',
+    'ầ'  => 'Ầ',
+    'ẩ'  => 'Ẩ',
+    'ẫ'  => 'Ẫ',
+    'ậ'  => 'Ậ',
+    'ắ'  => 'Ắ',
+    'ằ'  => 'Ằ',
+    'ẳ'  => 'Ẳ',
+    'ẵ'  => 'Ẵ',
+    'ặ'  => 'Ặ',
+    
+    'b'  => 'B',
+    
+    'c'  => 'C',
+    'ç'  => 'Ç',
+    'ć'  => 'Ć',
+    'ĉ'  => 'Ĉ',
+    'ċ'  => 'Ċ',
+    'č'  => 'Č',
+
+    'd'  => 'D',
+    'ď'  => 'Ď',
+    'đ'  => 'Đ',
+    
+    'e'  => 'E',
+    'è'  => 'È',
+    'é'  => 'É',
+    'ê'  => 'Ê',
+    'ë'  => 'Ë',
+    'ē'  => 'Ē',
+    'ĕ'  => 'Ĕ',
+    'ė'  => 'Ė',
+    'ę'  => 'Ę',
+    'ě'  => 'Ě',
+    'ẹ'  => 'Ẹ',
+    'ẻ'  => 'Ẻ',
+    'ẽ'  => 'Ẽ',
+    'ế'  => 'Ế',
+    'ề'  => 'Ề',
+    'ể'  => 'Ể',
+    'ễ'  => 'Ễ',
+    'ệ'  => 'Ệ',
+    
+    'f'  => 'F ƒ',
+    
+    'g'  => 'G',
+    'ĝ'  => 'Ĝ',
+    'ğ'  => 'Ğ',
+    'ġ'  => 'Ġ',
+    'ģ'  => 'Ģ',
+    
+    'h'  => 'H',
+    'ĥ'  => 'Ĥ',
+    'ħ'  => 'Ħ',
+    
+    'i'  => 'I ı İ',
+    'ì'  => 'Ì',
+    'í'  => 'Í',
+    'î'  => 'Î',
+    'ï'  => 'Ï',
+    'ĩ'  => 'Ĩ',
+    'ī'  => 'Ī',
+    'ĭ'  => 'Ĭ',
+    'į'  => 'Į',
+    'ǐ'  => 'Ǐ',
+    'ỉ'  => 'Ỉ',
+    'ị'  => 'Ị',
+    
+    'j'  => 'J',
+    'ĵ'  => 'Ĵ',
+    
+    'k'  => 'K',
+    'ķ'  => 'Ķ',
+    
+    'l'  => 'L',
+    'ĺ'  => 'Ĺ',
+    'ļ'  => 'Ļ',
+    'ľ'  => 'Ľ',
+    'ŀ'  => 'Ŀ',
+    'ł'  => 'Ł',
+    
+    'm'  => 'M',
+    
+    'n'  => 'N',
+    'ñ'  => 'Ñ',
+    'ń'  => 'Ń',
+    'ņ'  => 'Ņ',
+    'ň'  => 'Ň',
+    
+    'o'  => 'O',
+    'ò'  => 'Ò',
+    'ó'  => 'Ó',
+    'ô'  => 'Ô',
+    'õ'  => 'Õ',
+    'ö'  => 'Ö',
+    'ø'  => 'Ø',
+    'ō'  => 'Ō',
+    'ŏ'  => 'Ŏ',
+    'ő'  => 'Ő',
+    'ơ'  => 'Ơ',
+    'ǒ'  => 'Ǒ',
+    'ǿ'  => 'Ǿ',
+    'ọ'  => 'Ọ',
+    'ỏ'  => 'Ỏ',
+    'ố'  => 'Ố',
+    'ồ'  => 'Ồ',
+    'ổ'  => 'Ổ',
+    'ỗ'  => 'Ỗ',
+    'ộ'  => 'Ộ',
+    'ớ'  => 'Ớ',
+    'ờ'  => 'Ờ',
+    'ở'  => 'Ở',
+    'ỡ'  => 'Ỡ',
+    'ợ'  => 'Ợ',
+    
+    'p'  => 'P',
+    
+    'q'  => 'Q ĸ',
+    
+    'r'  => 'R',
+    'ŕ'  => 'Ŕ',
+    'ŗ'  => 'Ŗ',
+    'ř'  => 'Ř',
+    
+    's'  => 'S ſ',
+    'ś'  => 'Ś',
+    'ŝ'  => 'Ŝ',
+    'ş'  => 'Ş',
+    'š'  => 'Š',
+    'ss' => 'ß',
+    
+    't'  => 'T',
+    'ţ'  => 'Ţ',
+    'ť'  => 'Ť',
+    'ŧ'  => 'Ŧ',
+    
+    'u'  => 'U',
+    'ù'  => 'Ù',
+    'ú'  => 'Ú',
+    'û'  => 'Û',
+    'ü'  => 'Ü',
+    'ũ'  => 'Ũ',
+    'ū'  => 'Ū',
+    'ŭ'  => 'Ŭ',
+    'ů'  => 'Ů',
+    'ű'  => 'Ű',
+    'ų'  => 'Ų',
+    'ǔ'  => 'Ǔ',
+    'ǖ'  => 'Ǖ',
+    'ǘ'  => 'Ǘ',
+    'ǚ'  => 'Ǚ',
+    'ǜ'  => 'Ǜ',
+    'ư'  => 'Ư',
+    'ụ'  => 'Ụ',
+    'ủ'  => 'Ủ',
+    'ứ'  => 'Ứ',
+    'ừ'  => 'Ừ',
+    'ử'  => 'Ử',
+    'ữ'  => 'Ữ',
+    'ự'  => 'Ự',
+    
+    'v'  => 'V',
+    
+    'w'  => 'W',
+    'ŵ'  => 'Ŵ',
+    'ẁ'  => 'Ẁ',
+    'ẃ'  => 'Ẃ',
+    'ẅ'  => 'Ẅ',
+    
+    'x'  => 'X',
+    
+    'y'  => 'Y',
+    'ý'  => 'Ý',
+    'ÿ'  => 'Ÿ',
+    'ỳ'  => 'Ỳ',
+    'ỵ'  => 'Ỵ',
+    'ỷ'  => 'Ỷ',
+    'ỹ'  => 'Ỹ',
+    'ŷ'  => 'Ŷ',
+    
+    'z'  => 'Z',
+    'ź'  => 'Ź',
+    'ż'  => 'Ż',
+    'ž'  => 'Ž',
+    
+    'ae' => 'æ Æ',
+    'aé' => 'ǽ Ǽ',
+    'ð'  => 'Ð',
+    'ə'  => 'Ə',
+    'ij' => 'ĳ Ĳ',
+    'ŋ'  => 'Ŋ',
+    'oe' => 'œ Œ',
+    'þ'  => 'Þ',
+    
+  // Greek
+    
+    'α'  => 'Α',
+    'ά'  => 'Ά',
+    'β'  => 'Β',
+    'γ'  => 'Γ',
+    'δ'  => 'Δ',
+    'ε'  => 'Ε',
+    'έ'  => 'Έ',
+    'ζ'  => 'Ζ',
+    'η'  => 'Η',
+    'ή'  => 'Ή',
+    'θ'  => 'Θ',
+    'ι'  => 'Ι',
+    'ί'  => 'Ί',
+    'ϊ'  => 'Ϊ',
+    'κ'  => 'Κ',
+    'λ'  => 'Λ',
+    'μ'  => 'Μ µ',
+    'ν'  => 'Ν',
+    'ξ'  => 'Ξ',
+    'ο'  => 'Ο',
+    'ό'  => 'Ό',
+    'π'  => 'Π',
+    'ρ'  => 'Ρ',
+    'σ'  => 'Σ ς',
+    'τ'  => 'Τ',
+    'υ'  => 'Υ',
+    'ύ'  => 'Ύ',
+    'ϋ'  => 'Ϋ',
+    'φ'  => 'Φ',
+    'χ'  => 'Χ',
+    'ψ'  => 'Ψ',
+    'ω'  => 'Ω',
+    'ώ'  => 'Ώ',
+    
+  // Cyrillic
+    
+    'а'  => 'А',
+    'б'  => 'Б',
+    'в'  => 'В',
+    'г'  => 'Г',
+    'ґ'  => 'Ґ',
+    'ғ'  => 'Ғ',
+    'д'  => 'Д',
+    'е'  => 'Е',
+    'ж'  => 'Ж',
+    'җ'  => 'Җ',
+    'з'  => 'З',
+    'и'  => 'И',
+    'й'  => 'Й',
+    'к'  => 'К',
+    'қ'  => 'Қ',
+    'ҝ'  => 'Ҝ',
+    'л'  => 'Л',
+    'м'  => 'М',
+    'н'  => 'Н',
+    'ң'  => 'Ң',
+    'о'  => 'О',
+    'п'  => 'П',
+    'р'  => 'Р',
+    'с'  => 'С',
+    'т'  => 'Т',
+    'у'  => 'У',
+    'ү'  => 'Ү',
+    'ұ'  => 'Ұ',
+    'ф'  => 'Ф',
+    'х'  => 'Х',
+    'ҳ'  => 'Ҳ',
+    'ц'  => 'Ц',
+    'ч'  => 'Ч',
+    'ҹ'  => 'Ҹ',
+    'ш'  => 'Ш',
+    'щ'  => 'Щ',
+    'ъ'  => 'Ъ',
+    'ы'  => 'Ы',
+    'ь'  => 'Ь',
+    'э'  => 'Э',
+    'ю'  => 'Ю',
+    'я'  => 'Я',
+    'ё'  => 'Ё',
+    'ђ'  => 'Ђ',
+    'ѓ'  => 'Ѓ',
+    'є'  => 'Є',
+    'ѕ'  => 'Ѕ',
+    'і'  => 'І',
+    'ї'  => 'Ї',
+    'ј'  => 'Ј',
+    'љ'  => 'Љ',
+    'њ'  => 'Њ',
+    'ћ'  => 'Ћ',
+    'ќ'  => 'Ќ',
+    'ў'  => 'Ў',
+    'џ'  => 'Џ',
+    'һ'  => 'Һ',
+    'ә'  => 'Ә',
+    'ө'  => 'Ө',
+    
+  );
+
+  $conf['LCAS_replacement_set'][3] = array(
+  // 3 : case insensitive, accents insensitive
+    
+  // Latin
+    
+    'a'  => 'A à À â Â á Á ã Ã ä Ä å Å ā Ā ă Ă ą Ą ǻ Ǻ ạ Ạ ả Ả ấ Ấ ầ Ầ ẩ Ẩ ẫ Ẫ ậ Ậ ắ Ắ ằ Ằ ẳ Ẳ ẵ Ẵ ặ Ặ @',
+    'b'  => 'B',
+    'c'  => 'C ç Ç ć Ć ĉ Ĉ ċ Ċ č Č',
+    'd'  => 'D ď Ď đ Đ',
+    'e'  => 'E è È é É ê Ê ë Ë ē Ē ĕ Ĕ ė Ė ę Ę ě Ě ẹ Ẹ ẻ Ẻ ẽ Ẽ ế Ế ề Ề ể Ể ễ Ễ ệ Ệ',
+    'f'  => 'F ƒ',
+    'g'  => 'G ĝ Ĝ ğ Ğ ġ Ġ ģ Ģ',
+    'h'  => 'H ĥ Ĥ ħ Ħ',
+    'i'  => 'I ı İ ì Ì í Í î Î ï Ï ĩ Ĩ ī Ī ĭ Ĭ į Į ǐ Ǐ ỉ Ỉ ị Ị',
+    'j'  => 'J ĵ Ĵ',
+    'k'  => 'K ķ Ķ',
+    'l'  => 'L ĺ Ĺ ļ Ļ ľ Ľ ŀ Ŀ ł Ł',
+    'm'  => 'M',
+    'n'  => 'N ŉ ñ Ñ ń Ń ņ Ņ ň Ň',
+    'o'  => 'O ò Ò ó Ó ô Ô õ Õ ö Ö ø Ø ō Ō ŏ Ŏ ő Ő ơ Ơ ǒ Ǒ ǿ Ǿ ọ Ọ ỏ Ỏ ố Ố ồ Ồ ổ Ổ ỗ Ỗ ộ Ộ ớ Ớ ờ Ờ ở Ở ỡ Ỡ ợ Ợ',
+    'p'  => 'P',
+    'q'  => 'Q ĸ',
+    'r'  => 'R ŕ Ŕ ŗ Ŗ ř Ř',
+    's'  => 'S ś Ś ŝ Ŝ ş Ş š Š s ſ',
+    'ss' => 'ß',
+    't'  => 'T ţ Ţ ť Ť ŧ Ŧ',
+    'u'  => 'U ù Ù ú Ú û Û ü Ü ũ Ũ ū Ū ŭ Ŭ ů Ů ű Ű ų Ų ǔ Ǔ ǖ Ǖ ǘ Ǘ ǚ Ǚ ǜ Ǜ ư Ư ụ Ụ ủ Ủ ứ Ứ ừ Ừ ử Ử ữ Ữ ự Ự',
+    'v'  => 'V',
+    'w'  => 'W ŵ Ŵ ẁ Ẁ ẃ Ẃ ẅ Ẅ',
+    'x'  => 'X',
+    'y'  => 'Y ý Ý ÿ Ÿ ỳ Ỳ ỵ Ỵ ỷ Ỷ ỹ Ỹ ŷ Ŷ',
+    'z'  => 'Z ź Ź ż Ż ž Ž',
+    'ae' => 'æ Æ ǽ Ǽ',
+    'ð'  => 'Ð',
+    'ə'  => 'Ə',
+    'ij' => 'ĳ Ĳ',
+    'ŋ'  => 'Ŋ',
+    'oe' => 'œ Œ',
+    'þ'  => 'Þ',
+    
+  // Greek
+    
+    'α'  => 'Α ά Ά',
+    'β'  => 'Β',
+    'γ'  => 'Γ',
+    'δ'  => 'Δ',
+    'ε'  => 'Ε έ Έ',
+    'ζ'  => 'Ζ',
+    'η'  => 'Η ή Ή',
+    'θ'  => 'Θ',
+    'ι'  => 'Ι ί Ί ϊ Ϊ ΐ',
+    'κ'  => 'Κ',
+    'λ'  => 'Λ',
+    'μ'  => 'Μ µ',
+    'ν'  => 'Ν',
+    'ξ'  => 'Ξ',
+    'ο'  => 'Ο ό Ό',
+    'π'  => 'Π',
+    'ρ'  => 'Ρ',
+    'σ'  => 'Σ ς',
+    'τ'  => 'Τ',
+    'υ'  => 'Υ ύ Ύ ϋ Ϋ ΰ',
+    'φ'  => 'Φ',
+    'χ'  => 'Χ',
+    'ψ'  => 'Ψ',
+    'ω'  => 'Ω ώ Ώ',
+    
+  // Cyrillic
+    
+    'а'  => 'А',
+    'б'  => 'Б',
+    'в'  => 'В',
+    'г'  => 'Г ґ Ґ ғ Ғ',
+    'д'  => 'Д',
+    'е'  => 'Е',
+    'ж'  => 'Ж җ Җ',
+    'з'  => 'З',
+    'и'  => 'И',
+    'й'  => 'Й',
+    'к'  => 'К қ Қ ҝ Ҝ',
+    'л'  => 'Л',
+    'м'  => 'М',
+    'н'  => 'Н ң Ң',
+    'о'  => 'О',
+    'п'  => 'П',
+    'р'  => 'Р',
+    'с'  => 'С',
+    'т'  => 'Т',
+    'у'  => 'У',
+    'ү'  => 'Ү',
+    'ұ'  => 'Ұ',
+    'ф'  => 'Ф',
+    'х'  => 'Х ҳ Ҳ',
+    'ц'  => 'Ц',
+    'ч'  => 'Ч ҹ Ҹ',
+    'ш'  => 'Ш',
+    'щ'  => 'Щ',
+    'ъ'  => 'Ъ',
+    'ы'  => 'Ы',
+    'ь'  => 'Ь',
+    'э'  => 'Э',
+    'ю'  => 'Ю',
+    'я'  => 'Я',
+    'ё'  => 'Ё',
+    'ђ'  => 'Ђ',
+    'ѓ'  => 'Ѓ',
+    'є'  => 'Є',
+    'ѕ'  => 'Ѕ',
+    'і'  => 'І',
+    'ї'  => 'Ї',
+    'ј'  => 'Ј',
+    'љ'  => 'Љ',
+    'њ'  => 'Њ',
+    'ћ'  => 'Ћ',
+    'ќ'  => 'Ќ',
+    'ў'  => 'Ў',
+    'џ'  => 'Џ',
+    'һ'  => 'Һ',
+    'ә'  => 'Ә',
+    'ө'  => 'Ө',
+    
+  );
+
+  $conf['LCAS_replacement_set'][2] = array(
+  // 2 : case sensitive, accents insensitive
+    
+  // Latin
+    
+    'a'  => 'à â á ã ä å ā ă ą ǻ ạ ả ấ ầ ẩ ẫ ậ ắ ằ ẳ ẵ ặ @',
+    'A'  => 'À Â Á Ã Ä Å Ā Ă Ą Ǻ Ạ Ả Ấ Ầ Ẩ Ẫ Ậ Ắ Ằ Ẳ Ẵ Ặ',
+    'c'  => 'ç ć ĉ ċ č',
+    'C'  => 'Ç Ć Ĉ Ċ Č',
+    'd'  => 'ď đ',
+    'D'  => 'Ď Đ',
+    'e'  => 'è é ê ë ē ĕ ė ę ě ẹ ẻ ẽ ế ề ể ễ ệ',
+    'E'  => 'È É Ê Ë Ē Ĕ Ė Ę Ě Ẹ Ẻ Ẽ Ế Ề Ể Ễ Ệ',
+    'f'  => 'ƒ',
+    'g'  => 'ĝ ğ ġ ģ',
+    'G'  => 'Ĝ Ğ Ġ Ģ',
+    'h'  => 'ĥ ħ',
+    'H'  => 'Ĥ Ħ',
+    'i'  => 'ì í î ï ĩ ī ĭ į ǐ ỉ ị ı',
+    'I'  => 'Ì Í Î Ï Ĩ Ī Ĭ Į Ǐ Ỉ Ị İ',
+    'j'  => 'ĵ',
+    'J'  => 'Ĵ',
+    'k'  => 'ķ',
+    'K'  => 'Ķ',
+    'l'  => 'ĺ ļ ľ ŀ ł',
+    'L'  => 'Ĺ Ļ Ľ Ŀ Ł',
+    'n'  => 'ñ ń ņ ň ŉ',
+    'N'  => 'Ñ Ń Ņ Ň',
+    'o'  => 'ò ó ô õ ö ø ō ŏ ő ơ ǒ ǿ ọ ỏ ố ồ ổ ỗ ộ ớ ờ ở ỡ ợ',
+    'O'  => 'Ò Ó Ô Õ Ö Ø Ō Ŏ Ő Ơ Ǒ Ǿ Ọ Ỏ Ố Ồ Ổ Ỗ Ộ Ớ Ờ Ở Ỡ Ợ',
+    'q'  => 'ĸ',
+    'r'  => 'ŕ ŗ ř',
+    'R'  => 'Ŕ Ŗ Ř',
+    's'  => 'ś ŝ ş š ſ',
+    'S'  => 'Ś Ŝ Ş Š',
+    'ss' => 'ß',
+    't'  => 'ţ ť ŧ',
+    'T'  => 'Ţ Ť Ŧ',
+    'u'  => 'ù ú û ü ũ ū ŭ ů ű ų ǔ ǖ ǘ ǚ ǜ ư ụ ủ ứ ừ ử ữ ự',
+    'U'  => 'Ù Ú Û Ü Ũ Ū Ŭ Ů Ű Ų Ǔ Ǖ Ǘ Ǚ Ǜ Ư Ụ Ủ Ứ Ừ Ử Ữ Ự',
+    'w'  => 'ŵ ẁ ẃ ẅ',
+    'W'  => 'Ŵ Ẁ Ẃ Ẅ',
+    'y'  => 'ý ÿ ỳ ỵ ỷ ỹ ŷ',
+    'Y'  => 'Ý Ÿ Ỳ Ỵ Ỷ Ỹ Ŷ',
+    'z'  => 'ź ż ž',
+    'Z'  => 'Ź Ż Ž',
+    'ae' => 'ǽ',
+    'AE' => 'Ǽ',
+    'ae' => 'æ',
+    'AE' => 'Æ',
+    'ij' => 'ĳ',
+    'IJ' => 'Ĳ',
+    'oe' => 'œ',
+    'OE' => 'Œ',
+    
+  // Greek
+    
+    'α'  => 'ά',
+    'Α'  => 'Ά',
+    'ε'  => 'έ',
+    'Ε'  => 'Έ',
+    'μ'  => 'µ',
+    'η'  => 'ή',
+    'Η'  => 'Ή',
+    'ι'  => 'ί ϊ ΐ',
+    'Ι'  => 'Ί Ϊ',
+    'ο'  => 'ό',
+    'Ο'  => 'Ό',
+    'σ'  => 'ς',
+    'υ'  => 'ύ ϋ ΰ',
+    'Υ'  => 'Ύ Ϋ',
+    'ω'  => 'ώ',
+    'Ω'  => 'Ώ',
+    
+  // Cyrillic
+    
+    'г'  => 'ґ ғ',
+    'Г'  => 'Ґ Ғ',
+    'ж'  => 'җ',
+    'Ж'  => 'Җ',
+    'к'  => 'қ ҝ',
+    'К'  => 'Қ Ҝ',
+    'н'  => 'ң',
+    'Н'  => 'Ң',
+    'х'  => 'ҳ',
+    'Х'  => 'Ҳ',
+    'ч'  => 'ҹ',
+    'Ч'  => 'Ҹ',
+    
+  );
+
+?>
Index: /extensions/LCAS/trunk/include/functions.inc.php
===================================================================
--- /extensions/LCAS/trunk/include/functions.inc.php	(revision 8564)
+++ /extensions/LCAS/trunk/include/functions.inc.php	(revision 8565)
@@ -27,5 +27,5 @@
 /**
  * Changes the characters of the given string as stated by values of
- * $conf['insensitive_case_logon'] and $LCAS_lang['char_replacement_set'].
+ * $conf['insensitive_case_logon'] and $conf['LCAS_replacement_set'].
  *
  * @param mix s: string, or array of strings, to evaluate
@@ -33,556 +33,29 @@
  * @return : string, or array of strings, modified as stated
 */
-function LCAS_change_case($Username, $Conf)
-{
-  $LCAS_lang                         = array();
-  $LCAS_lang['char_replacement_set'] = array();
-
-
-
-  // 0 : case sensitive, accents sensitive
-  $LCAS_lang['char_replacement_set'][1] = array(
-  // 1 : case insensitive, accents sensitive
-    
-  // Latin
-    
-    'a'  => 'A',
-    'à'  => 'À',
-    'â'  => 'Â',
-    'á'  => 'Á',
-    'ã'  => 'Ã',
-    'ä'  => 'Ä',
-    'å'  => 'Å',
-    'ā'  => 'Ā',
-    'ă'  => 'Ă',
-    'ą'  => 'Ą',
-    'ǻ'  => 'Ǻ',
-    'ạ'  => 'Ạ',
-    'ả'  => 'Ả',
-    'ấ'  => 'Ấ',
-    'ầ'  => 'Ầ',
-    'ẩ'  => 'Ẩ',
-    'ẫ'  => 'Ẫ',
-    'ậ'  => 'Ậ',
-    'ắ'  => 'Ắ',
-    'ằ'  => 'Ằ',
-    'ẳ'  => 'Ẳ',
-    'ẵ'  => 'Ẵ',
-    'ặ'  => 'Ặ',
-    
-    'b'  => 'B',
-    
-    'c'  => 'C',
-    'ç'  => 'Ç',
-    'ć'  => 'Ć',
-    'ĉ'  => 'Ĉ',
-    'ċ'  => 'Ċ',
-    'č'  => 'Č',
-
-    'd'  => 'D',
-    'ď'  => 'Ď',
-    'đ'  => 'Đ',
-    
-    'e'  => 'E',
-    'è'  => 'È',
-    'é'  => 'É',
-    'ê'  => 'Ê',
-    'ë'  => 'Ë',
-    'ē'  => 'Ē',
-    'ĕ'  => 'Ĕ',
-    'ė'  => 'Ė',
-    'ę'  => 'Ę',
-    'ě'  => 'Ě',
-    'ẹ'  => 'Ẹ',
-    'ẻ'  => 'Ẻ',
-    'ẽ'  => 'Ẽ',
-    'ế'  => 'Ế',
-    'ề'  => 'Ề',
-    'ể'  => 'Ể',
-    'ễ'  => 'Ễ',
-    'ệ'  => 'Ệ',
-    
-    'f'  => 'F ƒ',
-    
-    'g'  => 'G',
-    'ĝ'  => 'Ĝ',
-    'ğ'  => 'Ğ',
-    'ġ'  => 'Ġ',
-    'ģ'  => 'Ģ',
-    
-    'h'  => 'H',
-    'ĥ'  => 'Ĥ',
-    'ħ'  => 'Ħ',
-    
-    'i'  => 'I ı İ',
-    'ì'  => 'Ì',
-    'í'  => 'Í',
-    'î'  => 'Î',
-    'ï'  => 'Ï',
-    'ĩ'  => 'Ĩ',
-    'ī'  => 'Ī',
-    'ĭ'  => 'Ĭ',
-    'į'  => 'Į',
-    'ǐ'  => 'Ǐ',
-    'ỉ'  => 'Ỉ',
-    'ị'  => 'Ị',
-    
-    'j'  => 'J',
-    'ĵ'  => 'Ĵ',
-    
-    'k'  => 'K',
-    'ķ'  => 'Ķ',
-    
-    'l'  => 'L',
-    'ĺ'  => 'Ĺ',
-    'ļ'  => 'Ļ',
-    'ľ'  => 'Ľ',
-    'ŀ'  => 'Ŀ',
-    'ł'  => 'Ł',
-    
-    'm'  => 'M',
-    
-    'n'  => 'N',
-    'ñ'  => 'Ñ',
-    'ń'  => 'Ń',
-    'ņ'  => 'Ņ',
-    'ň'  => 'Ň',
-    
-    'o'  => 'O',
-    'ò'  => 'Ò',
-    'ó'  => 'Ó',
-    'ô'  => 'Ô',
-    'õ'  => 'Õ',
-    'ö'  => 'Ö',
-    'ø'  => 'Ø',
-    'ō'  => 'Ō',
-    'ŏ'  => 'Ŏ',
-    'ő'  => 'Ő',
-    'ơ'  => 'Ơ',
-    'ǒ'  => 'Ǒ',
-    'ǿ'  => 'Ǿ',
-    'ọ'  => 'Ọ',
-    'ỏ'  => 'Ỏ',
-    'ố'  => 'Ố',
-    'ồ'  => 'Ồ',
-    'ổ'  => 'Ổ',
-    'ỗ'  => 'Ỗ',
-    'ộ'  => 'Ộ',
-    'ớ'  => 'Ớ',
-    'ờ'  => 'Ờ',
-    'ở'  => 'Ở',
-    'ỡ'  => 'Ỡ',
-    'ợ'  => 'Ợ',
-    
-    'p'  => 'P',
-    
-    'q'  => 'Q ĸ',
-    
-    'r'  => 'R',
-    'ŕ'  => 'Ŕ',
-    'ŗ'  => 'Ŗ',
-    'ř'  => 'Ř',
-    
-    's'  => 'S ſ',
-    'ś'  => 'Ś',
-    'ŝ'  => 'Ŝ',
-    'ş'  => 'Ş',
-    'š'  => 'Š',
-    'ss' => 'ß',
-    
-    't'  => 'T',
-    'ţ'  => 'Ţ',
-    'ť'  => 'Ť',
-    'ŧ'  => 'Ŧ',
-    
-    'u'  => 'U',
-    'ù'  => 'Ù',
-    'ú'  => 'Ú',
-    'û'  => 'Û',
-    'ü'  => 'Ü',
-    'ũ'  => 'Ũ',
-    'ū'  => 'Ū',
-    'ŭ'  => 'Ŭ',
-    'ů'  => 'Ů',
-    'ű'  => 'Ű',
-    'ų'  => 'Ų',
-    'ǔ'  => 'Ǔ',
-    'ǖ'  => 'Ǖ',
-    'ǘ'  => 'Ǘ',
-    'ǚ'  => 'Ǚ',
-    'ǜ'  => 'Ǜ',
-    'ư'  => 'Ư',
-    'ụ'  => 'Ụ',
-    'ủ'  => 'Ủ',
-    'ứ'  => 'Ứ',
-    'ừ'  => 'Ừ',
-    'ử'  => 'Ử',
-    'ữ'  => 'Ữ',
-    'ự'  => 'Ự',
-    
-    'v'  => 'V',
-    
-    'w'  => 'W',
-    'ŵ'  => 'Ŵ',
-    'ẁ'  => 'Ẁ',
-    'ẃ'  => 'Ẃ',
-    'ẅ'  => 'Ẅ',
-    
-    'x'  => 'X',
-    
-    'y'  => 'Y',
-    'ý'  => 'Ý',
-    'ÿ'  => 'Ÿ',
-    'ỳ'  => 'Ỳ',
-    'ỵ'  => 'Ỵ',
-    'ỷ'  => 'Ỷ',
-    'ỹ'  => 'Ỹ',
-    'ŷ'  => 'Ŷ',
-    
-    'z'  => 'Z',
-    'ź'  => 'Ź',
-    'ż'  => 'Ż',
-    'ž'  => 'Ž',
-    
-    'ae' => 'æ Æ',
-    'aé' => 'ǽ Ǽ',
-    'ð'  => 'Ð',
-    'ə'  => 'Ə',
-    'ij' => 'ĳ Ĳ',
-    'ŋ'  => 'Ŋ',
-    'oe' => 'œ Œ',
-    'þ'  => 'Þ',
-    
-  // Greek
-    
-    'α'  => 'Α',
-    'ά'  => 'Ά',
-    'β'  => 'Β',
-    'γ'  => 'Γ',
-    'δ'  => 'Δ',
-    'ε'  => 'Ε',
-    'έ'  => 'Έ',
-    'ζ'  => 'Ζ',
-    'η'  => 'Η',
-    'ή'  => 'Ή',
-    'θ'  => 'Θ',
-    'ι'  => 'Ι',
-    'ί'  => 'Ί',
-    'ϊ'  => 'Ϊ',
-    'κ'  => 'Κ',
-    'λ'  => 'Λ',
-    'μ'  => 'Μ µ',
-    'ν'  => 'Ν',
-    'ξ'  => 'Ξ',
-    'ο'  => 'Ο',
-    'ό'  => 'Ό',
-    'π'  => 'Π',
-    'ρ'  => 'Ρ',
-    'σ'  => 'Σ ς',
-    'τ'  => 'Τ',
-    'υ'  => 'Υ',
-    'ύ'  => 'Ύ',
-    'ϋ'  => 'Ϋ',
-    'φ'  => 'Φ',
-    'χ'  => 'Χ',
-    'ψ'  => 'Ψ',
-    'ω'  => 'Ω',
-    'ώ'  => 'Ώ',
-    
-  // Cyrillic
-    
-    'а'  => 'А',
-    'б'  => 'Б',
-    'в'  => 'В',
-    'г'  => 'Г',
-    'ґ'  => 'Ґ',
-    'ғ'  => 'Ғ',
-    'д'  => 'Д',
-    'е'  => 'Е',
-    'ж'  => 'Ж',
-    'җ'  => 'Җ',
-    'з'  => 'З',
-    'и'  => 'И',
-    'й'  => 'Й',
-    'к'  => 'К',
-    'қ'  => 'Қ',
-    'ҝ'  => 'Ҝ',
-    'л'  => 'Л',
-    'м'  => 'М',
-    'н'  => 'Н',
-    'ң'  => 'Ң',
-    'о'  => 'О',
-    'п'  => 'П',
-    'р'  => 'Р',
-    'с'  => 'С',
-    'т'  => 'Т',
-    'у'  => 'У',
-    'ү'  => 'Ү',
-    'ұ'  => 'Ұ',
-    'ф'  => 'Ф',
-    'х'  => 'Х',
-    'ҳ'  => 'Ҳ',
-    'ц'  => 'Ц',
-    'ч'  => 'Ч',
-    'ҹ'  => 'Ҹ',
-    'ш'  => 'Ш',
-    'щ'  => 'Щ',
-    'ъ'  => 'Ъ',
-    'ы'  => 'Ы',
-    'ь'  => 'Ь',
-    'э'  => 'Э',
-    'ю'  => 'Ю',
-    'я'  => 'Я',
-    'ё'  => 'Ё',
-    'ђ'  => 'Ђ',
-    'ѓ'  => 'Ѓ',
-    'є'  => 'Є',
-    'ѕ'  => 'Ѕ',
-    'і'  => 'І',
-    'ї'  => 'Ї',
-    'ј'  => 'Ј',
-    'љ'  => 'Љ',
-    'њ'  => 'Њ',
-    'ћ'  => 'Ћ',
-    'ќ'  => 'Ќ',
-    'ў'  => 'Ў',
-    'џ'  => 'Џ',
-    'һ'  => 'Һ',
-    'ә'  => 'Ә',
-    'ө'  => 'Ө',
-    
-  );
-
-  $LCAS_lang['char_replacement_set'][3] = array(
-  // 3 : case insensitive, accents insensitive
-    
-  // Latin
-    
-    'a'  => 'A à À â Â á Á ã Ã ä Ä å Å ā Ā ă Ă ą Ą ǻ Ǻ ạ Ạ ả Ả ấ Ấ ầ Ầ ẩ Ẩ ẫ Ẫ ậ Ậ ắ Ắ ằ Ằ ẳ Ẳ ẵ Ẵ ặ Ặ @',
-    'b'  => 'B',
-    'c'  => 'C ç Ç ć Ć ĉ Ĉ ċ Ċ č Č',
-    'd'  => 'D ď Ď đ Đ',
-    'e'  => 'E è È é É ê Ê ë Ë ē Ē ĕ Ĕ ė Ė ę Ę ě Ě ẹ Ẹ ẻ Ẻ ẽ Ẽ ế Ế ề Ề ể Ể ễ Ễ ệ Ệ',
-    'f'  => 'F ƒ',
-    'g'  => 'G ĝ Ĝ ğ Ğ ġ Ġ ģ Ģ',
-    'h'  => 'H ĥ Ĥ ħ Ħ',
-    'i'  => 'I ı İ ì Ì í Í î Î ï Ï ĩ Ĩ ī Ī ĭ Ĭ į Į ǐ Ǐ ỉ Ỉ ị Ị',
-    'j'  => 'J ĵ Ĵ',
-    'k'  => 'K ķ Ķ',
-    'l'  => 'L ĺ Ĺ ļ Ļ ľ Ľ ŀ Ŀ ł Ł',
-    'm'  => 'M',
-    'n'  => 'N ŉ ñ Ñ ń Ń ņ Ņ ň Ň',
-    'o'  => 'O ò Ò ó Ó ô Ô õ Õ ö Ö ø Ø ō Ō ŏ Ŏ ő Ő ơ Ơ ǒ Ǒ ǿ Ǿ ọ Ọ ỏ Ỏ ố Ố ồ Ồ ổ Ổ ỗ Ỗ ộ Ộ ớ Ớ ờ Ờ ở Ở ỡ Ỡ ợ Ợ',
-    'p'  => 'P',
-    'q'  => 'Q ĸ',
-    'r'  => 'R ŕ Ŕ ŗ Ŗ ř Ř',
-    's'  => 'S ś Ś ŝ Ŝ ş Ş š Š s ſ',
-    'ss' => 'ß',
-    't'  => 'T ţ Ţ ť Ť ŧ Ŧ',
-    'u'  => 'U ù Ù ú Ú û Û ü Ü ũ Ũ ū Ū ŭ Ŭ ů Ů ű Ű ų Ų ǔ Ǔ ǖ Ǖ ǘ Ǘ ǚ Ǚ ǜ Ǜ ư Ư ụ Ụ ủ Ủ ứ Ứ ừ Ừ ử Ử ữ Ữ ự Ự',
-    'v'  => 'V',
-    'w'  => 'W ŵ Ŵ ẁ Ẁ ẃ Ẃ ẅ Ẅ',
-    'x'  => 'X',
-    'y'  => 'Y ý Ý ÿ Ÿ ỳ Ỳ ỵ Ỵ ỷ Ỷ ỹ Ỹ ŷ Ŷ',
-    'z'  => 'Z ź Ź ż Ż ž Ž',
-    'ae' => 'æ Æ Ǽ ǽ',
-    'ð'  => 'Ð',
-    'ə'  => 'Ə',
-    'ij' => 'ĳ Ĳ',
-    'ŋ'  => 'Ŋ',
-    'oe' => 'œ Œ',
-    'þ'  => 'Þ',
-    
-  // Greek
-    
-    'α'  => 'Α ά Ά',
-    'β'  => 'Β',
-    'γ'  => 'Γ',
-    'δ'  => 'Δ',
-    'ε'  => 'Ε έ Έ',
-    'ζ'  => 'Ζ',
-    'η'  => 'Η ή Ή',
-    'θ'  => 'Θ',
-    'ι'  => 'Ι ί Ί ϊ Ϊ ΐ',
-    'κ'  => 'Κ',
-    'λ'  => 'Λ',
-    'μ'  => 'Μ µ',
-    'ν'  => 'Ν',
-    'ξ'  => 'Ξ',
-    'ο'  => 'Ο ό Ό',
-    'π'  => 'Π',
-    'ρ'  => 'Ρ',
-    'σ'  => 'Σ ς',
-    'τ'  => 'Τ',
-    'υ'  => 'Υ ύ Ύ ϋ Ϋ ΰ',
-    'φ'  => 'Φ',
-    'χ'  => 'Χ',
-    'ψ'  => 'Ψ',
-    'ω'  => 'Ω ώ Ώ',
-    
-  // Cyrillic
-    
-    'а'  => 'А',
-    'б'  => 'Б',
-    'в'  => 'В',
-    'г'  => 'Г ґ Ґ ғ Ғ',
-    'д'  => 'Д',
-    'е'  => 'Е',
-    'ж'  => 'Ж җ Җ',
-    'з'  => 'З',
-    'и'  => 'И',
-    'й'  => 'Й',
-    'к'  => 'К қ Қ ҝ Ҝ',
-    'л'  => 'Л',
-    'м'  => 'М',
-    'н'  => 'Н ң Ң',
-    'о'  => 'О',
-    'п'  => 'П',
-    'р'  => 'Р',
-    'с'  => 'С',
-    'т'  => 'Т',
-    'у'  => 'У',
-    'ү'  => 'Ү',
-    'ұ'  => 'Ұ',
-    'ф'  => 'Ф',
-    'х'  => 'Х ҳ Ҳ',
-    'ц'  => 'Ц',
-    'ч'  => 'Ч ҹ Ҹ',
-    'ш'  => 'Ш',
-    'щ'  => 'Щ',
-    'ъ'  => 'Ъ',
-    'ы'  => 'Ы',
-    'ь'  => 'Ь',
-    'э'  => 'Э',
-    'ю'  => 'Ю',
-    'я'  => 'Я',
-    'ё'  => 'Ё',
-    'ђ'  => 'Ђ',
-    'ѓ'  => 'Ѓ',
-    'є'  => 'Є',
-    'ѕ'  => 'Ѕ',
-    'і'  => 'І',
-    'ї'  => 'Ї',
-    'ј'  => 'Ј',
-    'љ'  => 'Љ',
-    'њ'  => 'Њ',
-    'ћ'  => 'Ћ',
-    'ќ'  => 'Ќ',
-    'ў'  => 'Ў',
-    'џ'  => 'Џ',
-    'һ'  => 'Һ',
-    'ә'  => 'Ә',
-    'ө'  => 'Ө',
-    
-  );
-
-  $LCAS_lang['char_replacement_set'][2] = array(
-  // 2 : case sensitive, accents insensitive
-    
-  // Latin
-    
-    'a'  => 'à â á ã ä å ā ă ą ǻ ạ ả ấ ầ ẩ ẫ ậ ắ ằ ẳ ẵ ặ @',
-    'A'  => 'À Â Á Ã Ä Å Ā Ă Ą Ǻ Ạ Ả Ấ Ầ Ẩ Ẫ Ậ Ắ Ằ Ẳ Ẵ Ặ',
-    'c'  => 'ç ć ĉ ċ č',
-    'C'  => 'Ç Ć Ĉ Ċ Č',
-    'd'  => 'ď đ',
-    'D'  => 'Ď Đ',
-    'e'  => 'è é ê ë ē ĕ ė ę ě ẹ ẻ ẽ ế ề ể ễ ệ',
-    'E'  => 'È É Ê Ë Ē Ĕ Ė Ę Ě Ẹ Ẻ Ẽ Ế Ề Ể Ễ Ệ',
-    'f'  => 'ƒ',
-    'g'  => 'ĝ ğ ġ ģ',
-    'G'  => 'Ĝ Ğ Ġ Ģ',
-    'h'  => 'ĥ ħ',
-    'H'  => 'Ĥ Ħ',
-    'i'  => 'ì í î ï ĩ ī ĭ į ǐ ỉ ị ı',
-    'I'  => 'Ì Í Î Ï Ĩ Ī Ĭ Į Ǐ Ỉ Ị İ',
-    'j'  => 'ĵ',
-    'J'  => 'Ĵ',
-    'k'  => 'ķ',
-    'K'  => 'Ķ',
-    'l'  => 'ĺ ļ ľ ŀ ł',
-    'L'  => 'Ĺ Ļ Ľ Ŀ Ł',
-    'n'  => 'ñ ń ņ ň ŉ',
-    'N'  => 'Ñ Ń Ņ Ň',
-    'o'  => 'ò ó ô õ ö ø ō ŏ ő ơ ǒ ǿ ọ ỏ ố ồ ổ ỗ ộ ớ ờ ở ỡ ợ',
-    'O'  => 'Ò Ó Ô Õ Ö Ø Ō Ŏ Ő Ơ Ǒ Ǿ Ọ Ỏ Ố Ồ Ổ Ỗ Ộ Ớ Ờ Ở Ỡ Ợ',
-    'q'  => 'ĸ',
-    'r'  => 'ŕ ŗ ř',
-    'R'  => 'Ŕ Ŗ Ř',
-    's'  => 'ś ŝ ş š ſ',
-    'S'  => 'Ś Ŝ Ş Š',
-    'ss' => 'ß',
-    't'  => 'ţ ť ŧ',
-    'T'  => 'Ţ Ť Ŧ',
-    'u'  => 'ù ú û ü ũ ū ŭ ů ű ų ǔ ǖ ǘ ǚ ǜ ư ụ ủ ứ ừ ử ữ ự',
-    'U'  => 'Ù Ú Û Ü Ũ Ū Ŭ Ů Ű Ų Ǔ Ǖ Ǘ Ǚ Ǜ Ư Ụ Ủ Ứ Ừ Ử Ữ Ự',
-    'w'  => 'ŵ ẁ ẃ ẅ',
-    'W'  => 'Ŵ Ẁ Ẃ Ẅ',
-    'y'  => 'ý ÿ ỳ ỵ ỷ ỹ ŷ',
-    'Y'  => 'Ý Ÿ Ỳ Ỵ Ỷ Ỹ Ŷ',
-    'z'  => 'ź ż ž',
-    'Z'  => 'Ź Ż Ž',
-    'ae' => 'ǽ',
-    'AE' => 'Ǽ',
-    'ij' => 'ĳ',
-    'IJ' => 'Ĳ',
-    'oe' => 'œ',
-    'OE' => 'Œ',
-    
-  // Greek
-    
-    'α'  => 'ά',
-    'Α'  => 'Ά',
-    'ε'  => 'έ',
-    'Ε'  => 'Έ',
-    'μ'  => 'µ',
-    'η'  => 'ή',
-    'Η'  => 'Ή',
-    'ι'  => 'ί ϊ ΐ',
-    'Ι'  => 'Ί Ϊ',
-    'ο'  => 'ό',
-    'Ο'  => 'Ό',
-    'σ'  => 'ς',
-    'υ'  => 'ύ ϋ ΰ',
-    'Υ'  => 'Ύ Ϋ',
-    'ω'  => 'ώ',
-    'Ω'  => 'Ώ',
-    
-  // Cyrillic
-    
-    'г'  => 'ґ ғ',
-    'Г'  => 'Ґ Ғ',
-    'ж'  => 'җ',
-    'Ж'  => 'Җ',
-    'к'  => 'қ ҝ',
-    'К'  => 'Қ Ҝ',
-    'н'  => 'ң',
-    'Н'  => 'Ң',
-    'х'  => 'ҳ',
-    'Х'  => 'Ҳ',
-    'ч'  => 'ҹ',
-    'Ч'  => 'Ҹ',
-    
-  );
+function LCAS_change_case($Username, $Option)
+{
+  global $conf;
+
   // Exits immediately without changing the parameter, if the configuration
   // is set on "case sensitive and accent sensitive".
-  if (!isset($Conf) or
-    $Conf != 1 and
-    $Conf != 2 and
-    $Conf != 3
+  if (!isset($Option) or
+    $Option != 0 and
+    $Option != 1 and
+    $Option != 2 and
+    $Option != 3
   ) return $Username;
   
-  // $v remembers if the given parameter was an array or not
-  $s2 = ($v = (is_array($Username))) ? $Username : array(0 => $Username);
-  
+  include(LCAS_PATH.'include/LCAS_replacement_set.inc.php');
+
   // Builds an array of characters that must be replaced
   // $rep_char is the replacement character ; $char_rep_arr is an array of 
   // characters which have to be replaced. ie :
   // if
-  // $LCAS_lang['char_replacement_set'][$conf['insensitive_case_logon']]['e'] ='é è'
+  // $conf['LCAS_replacement_set'][$Option]['e'] ='é è'
   // then
   // $char_rep_arr['é'] = 'e' ; $char_rep_arr['è'] = 'e'.
   $char_rep_arr = array();
   foreach (
-   $LCAS_lang['char_replacement_set'][$Conf]
+   $conf['LCAS_replacement_set'][$Option]
    as $rep_char => $char_rep_list
   ) {
@@ -591,21 +64,16 @@
   }
   
-  // Replacement in each string of $s2 of the characters
+  // Replacement in each string of $Username of the characters
   // that needs to be replaced
-  $r = array();
-  foreach ($s2 as $s) {
-    $t = LCAS_mbStringToArray($s); $t2 ='';
-    foreach ($t as $c) {
-      if (array_key_exists($c, $char_rep_arr))
-       $t2.= $char_rep_arr[$c];
-      else
-       $t2.= $c;
-    }
-    $r[] = $t2;
+  $t = LCAS_mbStringToArray($Username); $r ='';
+  foreach ($t as $c) {
+    if (array_key_exists($c, $char_rep_arr))
+     $r.= $char_rep_arr[$c];
+    else
+     $r.= $c;
   }
   
   // Return of the result
-  if ($v) return $r;
-  else return $r[0];
+  return $r;
 }
 
