Forums

[resolved] Justin Blanton's Smart Archives: character encoding issue (4 posts)

  1. baudesign
    Member
    Posted 5 years ago #

    Hi everyone,

    I am trying to get Justin Blanton's Smart Archives plugin to work with my thème en devenir. But there is an encoding issue. I just can't get this thing to work properly.

    My site is in French, UTF-8 encoded (fr_FR). The plugin seems to pull some ISO-8859-1 encoding. And I do not know what to do with that.

    Have a look at my archives page

    The plugin code goes like this:

    function smartArchives($format='both', $catID='') {
    
    	global $wpdb, $PHP_SELF;
        setlocale(LC_ALL,WPLANG); // set localization language
        $now = gmdate("Y-m-d H:i:s",(time()+((get_settings('gmt_offset'))*3600)));  // get the current GMT date
        $bogusDate = "/01/2001"; // used for the strtotime() function below
    ...in part

    Thanks for the help. Or if you know a better way to present archives, I will gladly be listening to suggestions.

    Thanks

    Patrick

  2. baudesign
    Member
    Posted 5 years ago #

    Everything is generated by the PHP program, so it looks. There are no months in the script itself. Perhaps it has to do with setlocale(LC_ALL,WPLANG); // set localization language Any idea?

    I tried to get in touch with the plugin developer, but unless his spam filter trashes my message because there is a hyperlink inlcuded in it, he does not respond.

    Thanks for any suggestion.

  3. baudesign
    Member
    Posted 5 years ago #

    The clue is explained here:

    strftime()

    The solution, for me:

    setlocale(LC_ALL,'fr_FR.UTF-8'); // set localization language French, with UTF-8 encoding

  4. kReEsTaL
    Member
    Posted 4 years ago #

    Thank you so much! I had the same issue, thanks to you it's perfect now.*

Topic Closed

This topic has been closed to new replies.

About this Topic