Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #35830 > unrolled thread

Re: Python 3.3, gettext and Unicode problems

Started byMarcel Rodrigues <marcelgmr@gmail.com>
First post2012-12-31 00:45 -0200
Last post2012-12-31 00:45 -0200
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Python 3.3, gettext and Unicode problems Marcel Rodrigues <marcelgmr@gmail.com> - 2012-12-31 00:45 -0200

#35830 — Re: Python 3.3, gettext and Unicode problems

FromMarcel Rodrigues <marcelgmr@gmail.com>
Date2012-12-31 00:45 -0200
SubjectRe: Python 3.3, gettext and Unicode problems
Message-ID<mailman.1482.1356921942.29569.python-list@python.org>

[Multipart message — attachments visible in raw view] — view raw

Thank you Terry!

I was trying to follow the documentation but somehow didn't payed attention
to the lgettext/gettext distinction until I read your first response.
Changing lgettext to gettext solved the problem.

It prints correctly to my console because I have to environmental
variable PYTHONIOENCODING set to utf8, which is what my console emulator
uses. But that's actually not necessary in my original application (it has
a web interface), just for this isolated test. I really should have
separated the call to print() as you suggested tough, if only to make the
problem clearer.

As for the "multiple different limited national encodings" vs "everything
as UTF-8", I agree with you and am definitely going for the latter because
the former seems to be unnecessarily complicated.

Thanks again for the help! Problem solved.

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web