From: Daniel J Walsh <dwalsh@redhat.com>
To: Karl MacMillan <kmacmillan@mentalrootkit.com>
Cc: SE Linux <selinux@tycho.nsa.gov>, Stephen Smalley <sds@tycho.nsa.gov>
Subject: Re: translation patch for semanage
Date: Thu, 11 Jan 2007 16:20:01 -0500 [thread overview]
Message-ID: <45A6AA01.5070802@redhat.com> (raw)
In-Reply-To: <1168540385.7048.28.camel@localhost.localdomain>
Karl MacMillan wrote:
> On Thu, 2007-01-11 at 09:09 -0500, Daniel J Walsh wrote:
>
>> This patch works around a unicode problem in python.
>>
>
> Can you give a little more detail - perhaps a BZ? It appears that this
> patch and the seobject patch or to force all translated strings to be
> unicode and output as unicode, correct? Why is this necessary?
>
No this patch forces all output strings to be the locale default. So it
basically does the right thing. BTW print works correctly.
I can not find any matching bugs on python source forge but trying to
login there is causing me no end of head aches. Asking people in the
know around here, I get this response
+import codecs
> +import locale
> +sys.stderr =
> codecs.getwriter(locale.getpreferredencoding())(sys.__stderr__,'replace')
>
> I was told by Ray that you knew about this problem in python? Do you know if this is an open bug?
Don't know if it's an open bug per se; other than python is well known
to be broken w/ respect to codecs.
Thanks,
-Jonathan
>
>> --- nsapolicycoreutils/semanage/semanage 2006-11-16
>> 17:14:26.000000000 -0500
>> +++ policycoreutils-1.33.10/semanage/semanage 2007-01-09
>> 11:55:52.000000000 -0500
>> @@ -23,12 +23,21 @@
>> import os, sys, getopt
>> import seobject
>> import selinux
>> +PROGNAME="policycoreutils"
>> +
>> import gettext
>> +gettext.bindtextdomain(PROGNAME, "/usr/share/locale")
>>
>
> Why is the location of the local files being forced? Is this appropriate
> for all distros or does it need to be configurable?
>
>
>> +gettext.textdomain(PROGNAME)
>> +import codecs
>> +import locale
>> +sys.stderr =
>> codecs.getwriter(locale.getpreferredencoding())(sys.__stderr__,
>> 'replace')
>> +sys.stdout =
>> codecs.getwriter(locale.getpreferredencoding())(sys.__stdout__,
>> 'replace')
>>
>
> Is this related to
> http://mail.python.org/pipermail/pythonmac-sig/2004-March/010651.html?
> I.e., is this to force the encoding rather than relying on the term to
> correctly communicate that it supports unicode / utf8 / etc.?
>
> If so, is this the "right" fix or just expedient?
>
> Karl
>
>
>
>
--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.
next prev parent reply other threads:[~2007-01-11 21:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-11 14:09 translation patch for semanage Daniel J Walsh
2007-01-11 18:33 ` Karl MacMillan
2007-01-11 21:20 ` Daniel J Walsh [this message]
2007-01-16 15:46 ` Karl MacMillan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=45A6AA01.5070802@redhat.com \
--to=dwalsh@redhat.com \
--cc=kmacmillan@mentalrootkit.com \
--cc=sds@tycho.nsa.gov \
--cc=selinux@tycho.nsa.gov \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.