ç (c-cedilla) messing with locale date formatting

  • I am trying to reproduce blog post dates in Catalan as follows:


    3 juliol 2019


    It works fine for all dates except anything in March (Març in Catalan) when the ç seems to trip it up, and it outputs nothing at all. (But it sorts the posts correctly, so it is just a display problem.)


    The pages are encoded with UTF-8, and I've encountered no other encoding issues afaik.


    in the blog index page I have:

    and in the post_in_list.html template:

    Code
    1. <perch:blog id="postDateTime" format="%e %B %Y" />


    Running Perch 3.1.5, Blog 5.6.1 with PHP 5.6.21.


    Any thoughts much appreciated.


    Peter

  • drewm

    Approved the thread.
  • Hi Drew, I've solved it by redefining the locale declaration to:


    setlocale(LC_TIME, 'ca_ES.UTF-8', 'Catalan_Spain', 'Catalan');


    instead of


    setlocale(LC_TIME, 'ca_ES', 'Catalan_Spain', 'Catalan');


    Thanks for your time.


    Peter