Re: I18n issue with optik



* Steven Bethard (Sun, 01 Apr 2007 10:21:40 -0600)
Thorsten Kampe wrote:
I'm not very experienced with internationalization, but if you change::

gettext.install('test')

to::

gettext.install('test', unicode=True)

what happens?

Actually, this is the solution.

But there's one more problem: the solution only works when the
Terminal encoding is not US-ASCII. Unfortunately (almost) all
terminals I tried are set to US-ASCII (rxvt under Cygwin, Console[1]
running bash, Poderosa[2] running bash). Only the Windows Console is
CP852 and this works.

I got the tip to set a different encoding by
sys.stdout = codecs.EncodedFile(sys.stdout, 'utf-8')

but unfortunately this does not change the encoding of any Terminal.
So my question is: how can I set a different encoding to sys.stdout
(or why can I set it without any error but nothing changes?)


Thorsten

[1] http://sourceforge.net/project/screenshots.php?group_id=43764
[2] http://en.poderosa.org/present/about_poderosa.html
.



Relevant Pages

  • Re: Getting the encoding of sys.stdout and sys.stdin, and changing it properly
    ... > the encoding in my terminal the result is still the same. ... > Is it the encoding of the string python "hands over" to the terminal? ... If you really mean "the encoding of the string sent ... in most terminals, and Python doesn't know how to use it, either. ...
    (comp.lang.python)
  • Re: JFS default behavior (was: UTF-8 in file systems? xfs/extfs/etc.)
    ... Sure, sure, I can read it since I use UTF-8 too. ... LC_CTYPE to the underlying UTF-8 encoding ... > the remote machine must use for displaying and inputting text, ... > client terminals come in different flavours. ...
    (Linux-Kernel)
  • (A Possible Solution) Re: preferred way to set encoding for print
    ... (See the Python help for details), but if your terminal doesn't support the ... encoding that won't help. ... appears on screen when using cp850 and cp1252 terminals. ... Do you want to print Chinese characters in a console ...
    (comp.lang.python)
  • Re: [PATCH -mm] sisusbvga: Fix bug and build warnings
    ... The encoding is set to ISO-2022-JP, ... US-ASCII 'quotes' around wherever it points out the name of an identifier ... -- and that confused alpine into thinking I was writing in Japanese ... I've explicitly set all mails to be sent out as US-ASCII only ...
    (Linux-Kernel)
  • Strange change in character encoding
    ... accept the character encoding that was used, ... The e-mail to which I replied shows that it was encoded in US-ASCII. ... Under the International Options on the Mail Formatting tab in Tools | ... checked Internet Explorer: it's set to choose the encoding ...
    (microsoft.public.outlook.general)

Loading