[pmwiki-users] page variable with setlocale and utf-8

Tom celok at gmx.net
Wed Jun 21 10:45:51 CDT 2006


Hallo Hans,

try setlocale(LC_TIME, 'de_DE.UTF8');

seen on: http://us2.php.net/function.setlocale
german: http://de.php.net/manual/de/function.setlocale.php

Hope that helps.

Beste Grüße,
Tom

Hans Bracker schrieb am 20.06.2006 19:57 Uhr:
> Has anyone any ides on this please?
> 
>> In blogsimple I assign the month name and long year to  a pagevariable
>> {$BlogMonth} via a function, including this:
>> $bmonth = strftime("%B %Y",$tdate);
>>
>> How can the pagevariable deliver utf-8 encoded localised names, like "März"?
>> If the wiki encodes via scripts/xlpage-utf-8.php, and I add for instance
>> setlocale(LC_TIME, 'ge');
>> to the blogsimple.php script, I get German month names from the
>> variable, but they don't encode in utf-8, so March appears as M?rz
>> instead of März.
>> If I add a simple
>> echo 'a';
>> for instance to the blogsimple.php, then March appears correctly as März.
>> I don't understand why this will make a difference, and obviously i
>> don't want to use echo, as it produces error messages at the page top.
>> I just mention it because it caused a correct name.
>>
>> setlocale(LC_TIME, 'ge.utf-8'); did not work.
>>
>> The XLPage settings seem to have no relevance.
>>
>> Any help is much appreciated.
>>
>> Hans
>>
> 
> _______________________________________________
> pmwiki-users mailing list
> pmwiki-users at pmichaud.com
> http://host.pmichaud.com/mailman/listinfo/pmwiki-users
> 
> 




More information about the pmwiki-users mailing list