Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Characters encoding and posted format tag
Hi folks ;)
When I try this: <txp:posted format="%B %Y" lang="fr-fr" />
I got this result: décembre 2016
Am I missing something? How to get this expective result: décembre 2016
before the new year?
:)
Note: the website is utf-8 encoding without any other character problems.
Edit: using <txp:posted format="%B %Y" lang="fre" />
display: December 2016
Last edited by Pat64 (2016-12-29 17:06:54)
Patrick.
Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.
Offline
Re: Characters encoding and posted format tag
I’d say it’s a bug. I f you have access to txplib_misc.php
, could you please replace
@list($lang, $charset) = explode('.', $locale);
with
@list($lang, $charset) = explode('.', setlocale(LC_TIME, 0));
around line 3058, and report back? Thanks.
Offline
Re: Characters encoding and posted format tag
Hi Oleg ;)
Nope. With TXP 4.6.2 <txp:posted format="%B %Y" lang="fre" />
display December 2016
even when changes had been made into the txplib_misc.php
file (line #3131).
Could you try yourself for confirmation? Thank you.
Last edited by Pat64 (2016-12-30 05:48:10)
Patrick.
Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.
Offline
Re: Characters encoding and posted format tag
Hi Patrick,
yes, I confirm for <txp:posted format="%B %Y" lang="fre" />
, but could you confirm for <txp:posted format="%B %Y" lang="fr-fr" />
and/or <txp:posted format="%B %Y" lang="fr_FR" />
?
Offline
Re: Characters encoding and posted format tag
Sure. Only <txp:posted format="%B %Y" lang="fr-fr" />
works but without the first letter capitalized. So, I use the ucfirst() function within a txp:php>
piece of code.
Thank you Oleg and congratulation for your recent promotion as a Core Dev ;)
Edit: With your latest commit changes (12c347d) for the dev version, all choices work: <txp:posted format="%d %B %Y" lang='<txp:lang />' />
<txp:posted format="%d %B %Y" lang="fre" />
<txp:posted format="%d %B %Y" lang="fr_FR" />
<txp:posted format="%d %B %Y" lang="fr-fr" />
. Good job!
Last edited by Pat64 (2016-12-31 06:14:35)
Patrick.
Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.
Offline