From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Max Arnold Newsgroups: gmane.emacs.help Subject: Re: python mode shell and unicode Date: Sun, 28 Mar 2010 10:47:56 +0800 Message-ID: <20100328024756.GA4890@bbone> References: <20100326153543.GA11085@bbone> <4BAE44D0.9090804@easy-emacs.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: dough.gmane.org 1269744524 29457 80.91.229.12 (28 Mar 2010 02:48:44 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 28 Mar 2010 02:48:44 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Mar 28 04:48:34 2010 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1NviYE-0000at-3Q for geh-help-gnu-emacs@m.gmane.org; Sun, 28 Mar 2010 04:48:34 +0200 Original-Received: from localhost ([127.0.0.1]:59191 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NviYD-0004g2-9R for geh-help-gnu-emacs@m.gmane.org; Sat, 27 Mar 2010 22:48:33 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NviXo-0004fA-Ag for help-gnu-emacs@gnu.org; Sat, 27 Mar 2010 22:48:08 -0400 Original-Received: from [140.186.70.92] (port=47395 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NviXl-0004dM-FJ for help-gnu-emacs@gnu.org; Sat, 27 Mar 2010 22:48:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NviXj-0004gm-Dm for help-gnu-emacs@gnu.org; Sat, 27 Mar 2010 22:48:05 -0400 Original-Received: from fg-out-1718.google.com ([72.14.220.159]:52547) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NviXj-0004gi-9P for help-gnu-emacs@gnu.org; Sat, 27 Mar 2010 22:48:03 -0400 Original-Received: by fg-out-1718.google.com with SMTP id l26so2231657fgb.12 for ; Sat, 27 Mar 2010 19:48:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:subject :message-id:mail-followup-to:references:mime-version:content-type :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=ugtSUkce9NsOjQQ4+V4B5NKeVwRuJh7fZkZcrvplASs=; b=fMLzB34sY2ZgPw0yh6/9fiBjIwHVDy4TrBiEPqbS5XwHjC4PXRMhb2dKl4cujBciSn Bxcj72RP/OHtSgE6kEEThVjFpjYQGCG+U9RmFi7B44aVZsDr+VpC0ikgJY/SLmACcM7I ISWtXGfs0A0Cuv52ZBwtMqn8HmgsdCh/Osby8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:subject:message-id:mail-followup-to:references :mime-version:content-type:content-disposition :content-transfer-encoding:in-reply-to:user-agent; b=wQGOVNmrRoN+eR64OHUdKMmGu+xSByrlVRZ1R80vFNpUG+dQK8g1mEqHY6PZfstnx+ Qip1u/GwXS/6kbeHNM7vjKOWWmYbPFDGZvp7YG/vGo7embqOPJdG4HwG6FpA4Bxi1pIp U5nYQNs/wgTun3E5hxahlwO04i0Z71whYOcEY= Original-Received: by 10.87.61.22 with SMTP id o22mr7152074fgk.50.1269744481604; Sat, 27 Mar 2010 19:48:01 -0700 (PDT) Original-Received: from bbone ([212.75.220.126]) by mx.google.com with ESMTPS id 16sm1907392fxm.0.2010.03.27.19.47.59 (version=SSLv3 cipher=RC4-MD5); Sat, 27 Mar 2010 19:47:59 -0700 (PDT) Mail-Followup-To: help-gnu-emacs@gnu.org Content-Disposition: inline In-Reply-To: <4BAE44D0.9090804@easy-emacs.de> User-Agent: Mutt/1.5.20 (2009-06-14) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:72497 Archived-At: On Sat, Mar 27, 2010 at 06:48:00PM +0100, Andreas Röhler wrote: > > My python-shell invoked via C-c C-c from python buffer can not print unicode characters (emits > > UnicodeEncodeError) and sys.stdout.encoding is empty. System wide LANG set to "ru_RU.UTF-8" and > > os.environ.get('LANG') in python shell confirms this. > > > > When python-shell invoked manually (M-x python-shell) there is no encoding issues. Any ideas? > > > What you get from > C-h v buffer-file-coding-system? --- buffer-file-coding-system is a variable defined in `C source code'. Its value is utf-8-unix Local in buffer test1.py; global value is utf-8-unix ... It does not apply to sending output to subprocesses, however. --- Python module contains encoding specification # -*- coding: utf-8 -*- at the beginning. Emacs version is 23.1.