Support » Fixing WordPress » strtotime returns strange characters

  • Resolved luciendub


    I want to show date of events created via custom post type and ACF in WordPress. I try to figure out why this:

    <?php setlocale(LC_TIME, 'fr_FR'); echo strftime('%d %h %Y', strtotime(get_field('date_de_levenement'))); ?>

    returns strange characters like this:

    04 ao�t 2014

    (Here ao�t should be août )

Viewing 1 replies (of 1 total)
  • I solved the problem with this!


    So I get

    <?php setlocale(LC_TIME, 'fr_FR'); define("CHARSET", "utf-8"); echo utf8_encode (strftime('%d %h %Y', strtotime(get_field('date_de_levenement')))); ?>

Viewing 1 replies (of 1 total)
  • The topic ‘strtotime returns strange characters’ is closed to new replies.