TortoiseHG isn't charset-agnostic anymore?
Old issue with full 8-bit texts and different charsets for GUI and CLI (solvable earlier - in HG 4-5 - with proper chcp
)
Mercurial
hg --version -v --debug
pager is unavailable with py2exe packaging
Mercurial Distributed SCM (version 6.2.3)
(see https://mercurial-scm.org for more information)
Copyright (C) 2005-2022 Olivia Mackall and others
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Enabled extensions:
convert internal
hggit external 1.0.0 (dulwich 0.20.46)
histedit internal
rebase internal
strip internal
Windows
ver
Microsoft Windows [Version 10.0.19045.2364]
Objects affected:
- 8bit texts of commit-messages
- 8bit filenames in diffs
- 8bit as diff-content
I haven't for now repos with 8bit filenames, but... The nature and manifestation of the effects of paragraphs 1 and 2 are the same
Steps to reproduce:
- Make commit with 8bit message in GUI (THG, cp1251)
- Try
hg log
in CLI (any, cp866 by default) - Switch codepage, repeat
hg log
- Get the same output (unreadable) both times, while expect it only on step 2
hg log -r ("5 or 11") -T compact | bat -p
5 8f2cca1130c2 2020-01-23 12:45 +0500 lazybadger
╚ёяЁртыхэшх чруюыютър, ЄхёЄ
11 96d6f08eeddf 2020-03-15 15:55 +0500 lazybadger
╬ЇюЁьыхэ√ чруюыютъш тёхї ёЄЁрэшЎ kick-start, шёяЁртыхэ√ юяхўрЄъш
chcp
Active code page: 866
chcp 1251
Active code page: 1251
hg log -r ("5 or 11") -T compact | bat -p
5 8f2cca1130c2 2020-01-23 12:45 +0500 lazybadger
╚ёяЁртыхэшх чруюыютър, ЄхёЄ
11 96d6f08eeddf 2020-03-15 15:55 +0500 lazybadger
╬ЇюЁьыхэ√ чруюыютъш тёхї ёЄЁрэшЎ kick-start, шёяЁртыхэ√ юяхўрЄъш
(Piping to bat added only for readability of chars, it doesn't perform any decoding, because plain log with my font produce just totally useless ����������� ���������, ����
)
Using decoder on bat's output, as restored my texts as "source encoding: WINDOWS-1251 displayed as: CP866" (which is definitely wrong for step 3 from "Steps")
Concerning item 3 from "Objects affected" list: I see readable output only for UTF8-encoded text, not for (common) cp 1251 windows-encoding, which is A Big Headache in some (non-coding) areas and cases, but less critical than every-day case for log