delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2019/12/28/06:27:42

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:date:from:to:subject:message-id:in-reply-to
:references:mime-version:content-type:content-transfer-encoding;
q=dns; s=default; b=VbX4sFVLXnZRXOmnqDuzzbT5UfYvStAFajYg3VfTAF1
fLOpnbp6UqeVpXqn/6knr4/GyCBN0XxApDdJxRXZziI3irfm1cRdWGpjLvNYqAEq
OKwwnsNngDz+e/3OnLUucj9DnXk+XmUDMEOsbGJOZy5UEtpba6zQuCqkiDEroqUk
=
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:date:from:to:subject:message-id:in-reply-to
:references:mime-version:content-type:content-transfer-encoding;
s=default; bh=PcyQTypU4qC3fihHWQ6HG/CQtIQ=; b=Yl4VwL/mMVJSyF2aX
kcfXPfisSeFXd+VAynoroOXJDPP6yK0/L/TcdQ+2KXnhirVLp8VX9pcKR4J5uHSy
NLWxt1Rh2mj9q4NUEVzBCAdVs1I4tYjt1hM5FTEOdTdAR/PjDXa/rFTPC3FYOi7y
691qEgi7i4KsuD0IsWzytyC0PQ=
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-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_00,BODY_8BITS,GARBLED_BODY,RCVD_IN_DNSWL_NONE autolearn=no version=3.3.1 spammy=HContent-Transfer-Encoding:8bit
X-HELO: conssluserg-01.nifty.com
DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-01.nifty.com xBSBQU4I027508
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.ne.jp; s=dec2015msa; t=1577532390; bh=iuZHuiVBMDpJX1DfGmsXchR/7FWLleuIsAkgtkW5qR0=; h=Date:From:To:Subject:In-Reply-To:References:From; b=Duc7FD3jGOzIXI54JsGfVn9dUJlyu5exGwZw+4TI+4B6DzI4LdZYVQWB+vUrx445k Wr6gTBrFgwvWIidoIeFE5Kf6vcE24/gPHasOTKqYmSuWTf1yzUSriBLfnUFgSyv0N2 GjQv9dOhsEsN36z2bGfRjGVyBzkSPSoTA8If90/o62r9nmS0CoSMThOW+AJnAdd7ld /+dd5/K3kQ+R459TEPJJfQU00hQ2BrvxyMjyyCxwM2akiCF7oGE+Cf39qS64u6XZ+W lj+O6hTjRsLHpVvliU9jrRH729soxNBhiNIQuBbB24SuZRSz4sqk4uwzmdNDaMI3xt nJHgfdsTDdShQ==
Date: Sat, 28 Dec 2019 20:26:37 +0900
From: Takashi Yano <takashi DOT yano AT nifty DOT ne DOT jp>
To: cygwin AT cygwin DOT com
Subject: Re: Cygwin 3.1 forcibly set wrong console code page
Message-Id: <20191228202637.bc01a72d28c35d96eeb53591@nifty.ne.jp>
In-Reply-To: <1369669088.20191227203831@yandex.ru>
References: <1369669088 DOT 20191227203831 AT yandex DOT ru>
Mime-Version: 1.0
X-IsSubscribed: yes
Note-from-DJ: This may be spam

On Fri, 27 Dec 2019 20:38:31 +0300
Andrey Repin wrote:
> Greetings, All!
> 
> Despite having "chcp.com 65001" in .bashrc, current codepage now reset to
> CP1251 (which is rather surprising, considering that default console codepage
> for russian cyrillic is 866).
> 
> I don't have the full understanding of what's happening, but somehow
> PROMPT_COMMAND is involved.
> 
> The observed effect is this:
> I have
> 1.
> PROMPT_COMMAND='printf "\e]0;${debian_chroot:+($debian_chroot)}${USER:-$USERNAME}@${HOSTNAME}: ${PWD/$HOME/\~}\a"'
> 2.
> chcp.com 65001
> 
> in the .bashrc, in that order.
> When I start mintty (as login shell or as regular interactive shell), chcp
> reports CP1251.
> If I run something like
> 
> $ uname -a; chcp; chcp 65001; chcp
> 
> It will report that CP was changed successfully
> 
> $ uname -a; chcp; chcp 65001; chcp
> CYGWIN_NT-6.1 daemon2 3.1.2(0.340/5/3) 2019-12-21 15:25 x86_64 Cygwin
> ’ҐЄгй п Є®¤®ў п бва ­Ёж : 1251
> Active code page: 65001
> Active code page: 65001
> 
> but an immediate call to chcp afterwards reports
> 
> $ chcp
> ’ҐЄгй п Є®¤®ў п бва ­Ёж : 1251
> 
> Ooopsss??

Thanks for the report. I have found the cause in pty code.
I will submit a patch for this issue shortly.

-- 
Takashi Yano <takashi DOT yano AT nifty DOT ne DOT jp>

--
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