From: Andrey Repin <anrdaemon@yandex.ru>
To: All <cygwin@cygwin.com>
Subject: Cygwin 3.1 forcibly set wrong console code page
Date: Sat, 28 Dec 2019 00:39:00 -0000 [thread overview]
Message-ID: <1369669088.20191227203831@yandex.ru> (raw)
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??
Now, the puzzling part:
(New mintty login shell)
Active code page: 65001
anrdaemon@daemon2:xterm:~
$ echo "$PROMPT_COMMAND"
__bash_prompt
anrdaemon@daemon2:xterm:~
$ chcp
’ҐЄгй п Є®¤®ў п бва Ёж : 1251
anrdaemon@daemon2:xterm:~
$ unset PROMPT_COMMAND
anrdaemon@daemon2:xterm:~
$ chcp 65001
Active code page: 65001
anrdaemon@daemon2:xterm:~
$ chcp
Active code page: 65001
anrdaemon@daemon2:xterm:~
$ PROMPT_COMMAND=__bash_prompt
anrdaemon@daemon2:xterm:~
$ chcp
Active code page: 65001
anrdaemon@daemon2:xterm:~
$ chcp
Active code page: 65001
anrdaemon@daemon2:xterm:~
$ netsh int ip show dns
Настройка интерфейса "Подключение по локальной сети"
...
All working line nothing happened.
Why???
--
With best regards,
Andrey Repin
Friday, December 27, 2019 18:56:50
Sorry for my terrible english...\0РўТРРҐ\a&ц&ЖVТ\a&W\x06ч'G3ў\x02\x02\x02\x02\x02\x02\x06‡GG\x03ўтц7–wv–вж6цТч\a&ц&ЖVЧ2ж‡FЦАР¤d\x15\x13ў\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x06‡GG\x03ўтц7–wv–вж6цТцf\x17\x12рР¤Fц7VЦVзF\x17F–цгў\x02\x02\x02\x02\x02\x02\x02\x02\x06‡GG\x03ўтц7–wv–вж6цТцFц72ж‡FЦАРҐVз7V'67&–&R\x06–жfуў\x02\x02\x02\x02\x02\x06‡GG\x03ўтц7–wv–вж6цТцЦВт7Vз7V'67&–&RЧ6–Ч\x06ЖPР Р
next reply other threads:[~2019-12-27 17:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-28 0:39 Andrey Repin [this message]
2019-12-28 12:26 ` Takashi Yano
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=1369669088.20191227203831@yandex.ru \
--to=anrdaemon@yandex.ru \
--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).