From: Takashi Yano <takashi.yano@nifty.ne.jp>
To: cygwin@cygwin.com
Subject: Re: Cygwin 3.1 forcibly set wrong console code page
Date: Sat, 28 Dec 2019 12:26:00 -0000 [thread overview]
Message-ID: <20191228202637.bc01a72d28c35d96eeb53591@nifty.ne.jp> (raw)
In-Reply-To: <1369669088.20191227203831@yandex.ru>
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.yano@nifty.ne.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
prev parent reply other threads:[~2019-12-28 11:26 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-28 0:39 Andrey Repin
2019-12-28 12:26 ` Takashi Yano [this message]
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=20191228202637.bc01a72d28c35d96eeb53591@nifty.ne.jp \
--to=takashi.yano@nifty.ne.jp \
--cc=cygwin@cygwin.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).