Hi,

It looks you don't set encoding (and content type) in the 'messages.po' - 
please change it.

My values:

"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: utf-8\n"

Regards,
Tom

W dniu czwartek, 8 stycznia 2015 10:04:44 UTC+1 użytkownik Suhas Patil 
napisał:
>
> I am trying to localize my application and I tried this example from 
> web.py cookbook:
>
> http://webpy.org/cookbook/i18n_support_in_template_file
>
> I followed all of the steps and yet when I tried to run the program, I got 
> following error. How do I fix it?
>
>
> File "/Users/suhas/kpmac/i18n.py", line 21, in <module>
> gettext.translation('messages', localedir, languages = 
> ['en_US']).install(True)
> File 
> "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/gettext.py",
>  
> line 478, in translation
> t = _translations.setdefault(key, class_(fp))
> File 
> "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/gettext.py",
>  
> line 180, in __init__
> self._parse(fp)
> File 
> "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/gettext.py",
>  
> line 337, in _parse
> tmsg = unicode(tmsg, self._charset)
>
> LookupError: unknown encoding: CHARSET
>
>
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"web.py" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/webpy.
For more options, visit https://groups.google.com/d/optout.

Reply via email to