delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2014/08/29/18:11:50

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:mime-version:from:date:message-id:subject:to
:content-type:content-transfer-encoding; q=dns; s=default; b=CHS
IB2rnb9nW4RFZOeek7Y+7D+TGINxI1o0cJQVJkLp7O8rZl5VP5yVVPEnwerGicXz
1imq8yUp9JFg+UU4h5VFgEWEJ0qrPP8eEGGH7AFsdWcDrx71nYctpsEqWoz6AKdd
jW+bZCw7V+YIu1IA5hiU3WE+jUv7Ie54WcvL/tUU=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:mime-version:from:date:message-id:subject:to
:content-type:content-transfer-encoding; s=default; bh=FSjEiyS1c
aZSTsP+L6HjrAEKU+4=; b=VtB9PNb0WvNeDaW/eO0y20TZEpauLqFq/5BMQzkSD
VxOlE55ddkdd0ttdxTe1M1jB/MlW2N+SdRUPuEnleRWF85ITKONo8vrI/ydELq5W
K3or5cwuztnG9JV0NQ9kygORDtn+GP/sbaOefuizuDq2+w6nZQEcoroIy2z+sQnL
3M=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2
X-HELO: mail-wi0-f175.google.com
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to :content-type:content-transfer-encoding; bh=5axeZ5ECs+enOz7XgWVgf/H1vA4xrAgcQ/bTEDxEnFI=; b=FcUut5ENnQYjN/MhjKcuq7Ko9R2JgWrdSGsJZWIMvloVzTB5E+qjc6bDeKChIkjXth 1MgGfYfunIRoLxcMsDDYhGgkAAY1tcvGqy6rc7Xzr2C7q2qUTS+wTGDtR8S5XTfwW06Y eVEKkIyMJR0koQyorZha3A0u2vpDe7/xyuusF2ToXP3ur2KzbxJvDykmYJ7yX1LBO7u0 ECPHcPhRwv51HncXDHX5PejVOjCktpGfCFlsFx8Un7WevqKhNqrxgx8fWxaXRWxaoh1K n3f6NdMvd0ksnVZ0eBL3E70hi3vocuFW1c1buwORotFefXaNmgiGmSnXmtQy2KgOwyNc GdWw==
X-Gm-Message-State: ALoCoQlEH86vsYBZzVRBac7BK6FIX6spWcxhT9r6OaYT3C5mq7ZqYh3L9ad2ceh95sOKh5510J06
X-Received: by 10.180.107.100 with SMTP id hb4mr6566300wib.59.1409350289660; Fri, 29 Aug 2014 15:11:29 -0700 (PDT)
MIME-Version: 1.0
From: =?ISO-8859-1?Q?Fr=E9d=E9ric_Bron?= <frederic DOT bron AT m4x DOT org>
Date: Sat, 30 Aug 2014 00:10:49 +0200
Message-ID: <CAPw2spiBXfpoWs1LfA8tbDr3gjOOvT5WbhXjR5qzzYk_D3XNVQ@mail.gmail.com>
Subject: python3 and mintty: why ANSI_X3.4-1968 encoding
To: cygwin <cygwin AT cygwin DOT com>
X-IsSubscribed: yes
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id s7TMBlO0025208

I am using mintty with option Text.locale=fr_FR and Character set=UTF-8
Why, then, python3 reports a different encoding (ANSI_X3.4-1968) for
stdout and stdin?

$ cat toto.py
import sys
print(sys.stdin.encoding)
print(sys.stdout.encoding)

$ python3 toto.py
ANSI_X3.4-1968
ANSI_X3.4-1968

Thanks,

Frédéric

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019