Actually, try this and see if it doesn't work...   ~lines 54-56

if ((!isset($_GET['p'])) || ($_GET['p'] == '')) $pageLink =
BOLTconfig('BOLTdefaultPage', 'main');
else $pageLink = $_GET['p'];
$pageLink = strtolower(BOLTutf2url($pageLink))

I just put the strtolower after the utf2url conversion, rather than
before. Seems to work fine now. What do you think?

Cheers,
Dan


On Wed, Mar 18, 2009 at 1:04 PM, Hans <[email protected]> wrote:
>
> Okay, also mb_strtolower messed up characters like ÜÄÖ on my tests.
>
> I went through the php strtolower comments and tried various functions.
> The one which worked restricts the case conversion just for lower
> ASCII characters.
> Any others are untouched. Meaning of course that ÄÖÜ will not be
> converted to äöü etc.
> but there are so many of these characters for different European languages
> that it would need special arrays for character translation. A possibility.
>
> Here is the function for lower case ASCII, it is supposed to be fast.:
>
> function strtolower2($s) {
>    $ln = strlen($s);
>    $ln1 = $ln -1;
>    for($i=0; $i < $ln; $i++){
>        $k = ord(substr($s, $i, 1));
>        if($k>=65 && $k <= 90){
>            if($i > 0){
>                $l1 = substr($s, 0, $i);
>            }else{
>                $l1 ='';
>            }
>            $l1 = $l1 . chr($k+32);
>            if($i < $ln1){
>                $l1 = $l1 . substr($s, $i  + 1);
>            }
>            $s = $l1;
>        }
>    }
>    return $s;
> }
>
>
> 2009/3/18 The Editor <[email protected]>:
>
>> I'd prefer to not use mb_strtolower as it is not enabled on all php
>> servers. So far I have avoided all the mb_functions. Can we just leave
>> the strtolower out?  Perhaps put it in the BOLTutf2url or something?
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to