Fix #1219

We were not setting the locale when compiling posts. That means that everything that's locale-dependent was wrong.

This was detected in the ``:doc:`` role but is probably also true of things like the title used in the ``.. contents::`` directive.