[!Ditto? &parents=`20` &tpl=`news-body` &language=`svenska-utf8` &dateFormat=`%A %e %B %Y, %H:%M`!]
setlocale(LC_ALL, 'sv_SE.UTF-8');
MÃ¥ndag 6 Augusti 2007, 14:09when it should look like this
Måndag 6 Augusti 2007, 14:09Can anyone give me a clue as to why this happens? I’m using the proper charset
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
Index: /trunk/assets/snippets/ditto/classes/ditto.class.inc.php
===================================================================
--- /trunk/assets/snippets/ditto/classes/ditto.class.inc.php (revision 1449)
+++ /trunk/assets/snippets/ditto/classes/ditto.class.inc.php (revision 1450)
@@ -1001,9 +1001,5 @@
function formatDate($dateUnixTime, $dateFormat) {
global $modx;
- $dt = strftime($dateFormat, (intval($dateUnixTime) + $modx->config["server_offset_time"]));
- if ($modx->config["modx_charset"] == "UTF-8") {
- $dt = utf8_encode($dt);
- }
- return $dt;
+ return strftime($dateFormat, (intval($dateUnixTime) + $modx->config["server_offset_time"]));
}
Index: /trunk/changelog.txt
===================================================================
--- /trunk/changelog.txt (revision 1449)
+++ /trunk/changelog.txt (revision 1450)
@@ -486,2 +486,5 @@
[NEW] New addFields replaces duplicate code loops with addField
[FIXED] Bug in userSort function
+
+[2007-8-07: REVISION 0000]
+[FIXED] UTF-8 dates
[!Ditto? &parents=`20` &tpl=`news-body` &language=`svenska-utf8` &dateFormat=`%A %e %B %Y, %H:%M`!]
[!Ditto? &parents=`20`!]