Bad encoding when using on strftime in spanish?

php

Solution

Try adding utf8_encode()

setlocale(LC_TIME, 'spanish');
define("CHARSET", "iso-8859-1");
echo utf8_encode(strftime("%A, %d de %B",strtotime($row['Date'])));

Problem

I'm trying to echo the date with strftime but I'm getting bad encoding on utf-8 only characters. (accented characters basically) ``` setlocale(LC_TIME, 'spanish'); define("CHARSET", "iso-8859-1"); echo strftime("%A, %d de %B",strtotime($row['Date'])); ``` Is there any problem in this part of the code? Everything is encoded in utf-8 and echoing a 'á' character above it displays the character correctly.

Original source