Search code examples
djangopython-2.7ubuntu-14.04mezzanineubuntu-server

Mezzanine - blog link is returning error page in ubuntu server


I've created a web site using Mezzanine and some blog posts aren't open, when the user clicks in the link, the site show a error page. The problem is because the author used accent in the title (e.g. "Títle") so the slug is created with the accent. In my development environment I have no problem if I put or not an accent in any word, so I suspect the problem is in ubuntu server 14.04 configuration (my development computer is using pt_BR language, I've changed the server language too, but with no success). The funny part is that if I write the url without the accent (e.g. http://example.com/title) the blog post is shown correctly. Could someone show me a path to follow and solve this problem?


Solution

  • See this issue for the list of likely solutions:

    • Make sure that you created your production database with a UTF-8 charset. This will cause headaches if you forget to do it.

    • Verify that the system locale supports UTF-8:

      Your system locale may be a default ASCII locale, like the “C” locale on UNIX-like systems (can be checked by the locale command). If it’s the case, please refer to your system documentation to learn how you can change this to a UTF-8 locale.

    • Verify that your wsgi handler (e.g., uwsgi, gunicorn) is being passed the right locale. Here's some sample config:

      environment=LANG="%(locale)s",LC_ALL="%(locale)s",LC_LANG="%(locale)s"