text encodings -> subprocess.Popen or -> labelmarkup (pygtk)

Fredrik Lundh fredrik at pythonware.com
Thu Feb 16 03:21:18 EST 2006


"calmar" wrote:

> Then I think, 'what' kind of encoding I can send to an external program,
> depends also on that program?

the encoding is a mapping between raw bytes and their actual meaning,
and a program usually only sees the bytes, so it's entirely up to the pro-
gram to interpret what you send to it.

many programs defaults to the system's "global" default encoding for text
input; you can use the "getpreferredencoding" function in the locale module
to figure out what it is set to:

    http://docs.python.org/lib/module-locale.html

</F>






More information about the Python-list mailing list