Following from the thread about the latest 2.61 version I can now
report some success.
I will try to list here all the changes i made in order to achieve
successful urf-8 handling for page names.
1. disband use of function BOLTurl2utf(), for every instance of
BOLTurl2utf use urldecode.
2. function BOLTsearchPageList: replace whole conditional block
if (isset($args['group'])) {
......
}
with
if (isset($args['group'])) {
$group = strtolower(rawurlencode($args['group']));
$group = str_replace('%2a', '*', $group);
$namespat = '-_a-zA-Z0-9.%';
if (strpos($args['group'], "*") !== false) {
if (preg_match("/^[$namespat*]$/", $group) === false)
return;
$pat = str_replace('.', '\.', $group);
$pat = str_replace(',', '|', $group);
$pat = '/^(' . str_replace('*', "[$namespat]*", $pat) .
')$/';
}
else $pat = '/^(' . str_replace(',', '|', $group) .
")\.([$namespat]+)$/";
}
// this allows utf-8 character as part of group= argument in search //
3. function BOLTpageshortcuts: replace
if (BOLTconfig('BOLTutfpages', 'true') == true) $link =
BOLTutf2url($link);
else $link = BOLTutf8_strip($link);
with
global $BOLTconfig;
if ($BOLTconfig['utfpages'] === 'false') $link = BOLTutf8_strip($link);
$link = urlencode($link);
// this gives working switch for stripping diacritics with utfpages:
false in site.config //
4. function BOLTutf8_strip replace whole part after array with
return strtr($text, $utf2asc);
5. function BOLTvarCache replace near end BOLTutf2url with urlencode
// not sure about that whole code line yet //
6. engine.php ca line 55 after
else $pageLink = strtolower(urlencode($_GET['p']));
remove
$pageLink = BOLTutf2url($pageLink);
// not needed //
7. function BOLTdomarkup change last line to
return urldecode(BOLTstripslashes($out));
// to render as utf-8 any % encoded characters //
8. markup function BOLTMlinks replace
if ($link != BOLTlowercase($x) && $label == $x) $label =
BOLTurl2utf($link);
with
if ($link != BOLTlowercase($x) && $label == $x) $label = $link;
// not needed any longer //
I think that's it so far. I may have forgotten some bits though!
And there may be other issues not addressed yet.
Cheers,
~Hans
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"BoltWire" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/boltwire?hl=en
-~----------~----~----~----~------~----~------~--~---