Revision 869
Added by thorn about 16 years ago
search_convert.php | ||
---|---|---|
32 | 32 |
header('Location: ../index.php'); |
33 | 33 |
exit(0); |
34 | 34 |
} |
35 |
if(!isset($search_lang)) $search_lang = LANGUAGE; |
|
35 | 36 |
|
36 | 37 |
//umlauts to '(upper|lower)' for preg_match() |
37 | 38 |
//this is UTF-8-encoded |
38 | 39 |
$string_ul_umlauts = array( |
40 |
"i" => "(?:i|\xc4\xb0|I)", |
|
41 |
"I" => "(?:I|\xc4\xb1|i)", |
|
42 |
"k" => "(?:k|\xe2\x84\xaa|K)", |
|
43 |
"S" => "(?:S|\xc5\xbf|s)", |
|
39 | 44 |
"\xc2\xb5" => "(?:\xc2\xb5|\xce\x9c)", |
45 |
"\xc3\x9f" => "(?:\xc3\x9f|SS|ss)", // german ß |
|
40 | 46 |
"\xc3\xa0" => "(?:\xc3\xa0|\xc3\x80)", |
41 | 47 |
"\xc3\xa1" => "(?:\xc3\xa1|\xc3\x81)", |
42 | 48 |
"\xc3\xa2" => "(?:\xc3\xa2|\xc3\x82)", |
... | ... | |
1460 | 1466 |
"\xf0\x90\x90\xa3" => "(?:\xf0\x90\x90\xa3|\xf0\x90\x91\x8b)", |
1461 | 1467 |
"\xf0\x90\x90\xa4" => "(?:\xf0\x90\x90\xa4|\xf0\x90\x91\x8c)", |
1462 | 1468 |
"\xf0\x90\x90\xa5" => "(?:\xf0\x90\x90\xa5|\xf0\x90\x91\x8d)" |
1463 |
//"i" => "(?:i|\xc4\xb0|I)", |
|
1464 |
//"I" => "(?:I|\xc4\xb1|i)", |
|
1465 |
//"k" => "(?:k|\xe2\x84\xaa|K)", |
|
1466 |
//"S" => "(?:S|\xc5\xbf|s)" |
|
1467 | 1469 |
); |
1468 | 1470 |
|
1471 |
|
|
1472 |
if($search_lang=='DE') { |
|
1473 |
$string_ul_umlauts["\xc3\x9f"] = "(?:\xc3\x9f|SS|ss)"; // german ß |
|
1474 |
$string_ul_umlauts["\xc3\xa4"] = "(?:\xc3\xa4|\xc3\x84|ae|Ae)"; // german ä |
|
1475 |
$string_ul_umlauts["\xc3\xb6"] = "(?:\xc3\xb6|\xc3\x96|oe|Oe)"; // german ö |
|
1476 |
$string_ul_umlauts["\xc3\xbc"] = "(?:\xc3\xbc|\xc3\x9c|ue|Ue)"; // german ü |
|
1477 |
$string_ul_umlauts["\xc3\x84"] = "(?:\xc3\x84|\xc3\xa4|Ae|ae)"; // german Ä |
|
1478 |
$string_ul_umlauts["\xc3\x96"] = "(?:\xc3\x96|\xc3\xb6|Oe|oe)"; // german Ö |
|
1479 |
$string_ul_umlauts["\xc3\x9c"] = "(?:\xc3\x9c|\xc3\xbc|Ue|ue)"; // german Ü |
|
1480 |
} |
|
1481 |
|
|
1469 | 1482 |
?> |
Also available in: Unified diff
search: added search_lang for use in search-form. Using DE, the search will search ä=ae,... (alternate spelling of german umlauts)
removed undocumented word-boundary search
search_path is now anchored to the beginning of link ("link LIKE '$path%'" instead of "link LIKE '%$path%'")
added key 'ext_charset' to search-extension to query external databases