← Back to team overview

zim-wiki team mailing list archive

Re: Date/time issues

 

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


Follow ups

References