The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results forĀ 
Search instead forĀ 
Did you mean:Ā 

how to customize the code page of the commit git-hoock message box?

alexandr_dragunkin
September 8, 2023

sourcetree_err_msg.png

Windows operating system

I use the following script \.git\hooks\commit-msg

#!/bin/sh

d:/VENV37/Scripts/activate.bat
COMMIT_MSG_FILE=$1

d:/VENV37/Scripts/python .git/hooks/commit-msg.py "$COMMIT_MSG_FILE"

How to get the correct display of characters in the console if the file is in UTF-8?

2 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Answer accepted
alexandr_dragunkin
September 8, 2023

In addition to the previous message

The terminal displays a message if I switch the character set to cp1251

But switching the encoding in \.git\hooks\commit-msg.py to cp1251 does not give any result

sourcetree_terminal_encode.png

0 votes
alexandr_dragunkin
September 8, 2023

Won! Indeed, some kind of symbol crept in. This behavior occurs if, when writing text, you correct the spelling using PuntoSwitcher. Apparently, this program leaves some traces when correcting the text.

I had to rewrite the text of the message completely carefully by hand and everything worked.

изображение_2023-09-08_205703268.png

Everything is beautiful in the terminal!

sourcetree_terminal_fix.png

DEPLOYMENT TYPE
SERVER
TAGS
AUG Leaders

Atlassian Community Events