zim-wiki team mailing list archive
-
zim-wiki team
-
Mailing list archive
-
Message #02402
Re: Date/time issues
Genius! That did it. Running the command returned "US-ASCII"—not empty—but
your change to line 742 did the trick. Thanks so much, Jaap! I will await
the next release for when the "=======" disappears from the top line in the
weekly journal pages.
Best, Alex
On Thu, Apr 25, 2013 at 3:34 PM, Jaap Karssenberg <
jaap.karssenberg@xxxxxxxxx> wrote:
> On Thu, Apr 25, 2013 at 9:28 PM, Alexander Bryan <ambrya@xxxxxxxxx> wrote:
> > 2. After creating a new page:
> >
> > "ERROR: Error in strftime "%A %d %B %Y
> > Traceback (most recent call last):
> > File "/Users/ambrya/source/zim-0.59/zim/templates.py", line 742, in
> > __call__
> > return string.decode(locale.getpreferredencoding())
> > LookupError: unknown encoding:"
>
> This is the real issue - don't worry about the python path or the XDG
> config.
>
> Could you run:
>
> $ python -c "import locale; print locale.getpreferredencoding()"
>
> I suspect that it will return empty - if so apparently on your system
> python has no idea what locale settings you are using. Typically
> should be something like "UTF-8".
>
> Replacing line 742 by:
>
> return string.decode('utf-8')
>
> should fix it in that case (mind the line indenting)
>
> Regards,
>
> Jaap
>
References