Answer the question
In order to leave comments, you need to log in
Hook script python incorrectly decodes Cyrillic output from linux shell. Where is the mistake?
There is a hook script for python. Here is its main function:
def main(repos):
log_cmd = '%s log "%s"' % (SVNLOOK, repos)
log_msg = os.popen(log_cmd, 'r').readline().rstrip('n')
rev_number_cmd = '%s info "%s"' % (SVNLOOK, repos)
out = subprocess.Popen(rev_number_cmd, stdout=subprocess.PIPE, shell=True)
revs = out.stdout.read().decode('UTF-8')
own_key = check_commit_message(log_msg, jira)
comment_jira_ticket(jira, own_key, revs)
if __name__ == '__main__':
main(sys.argv[1])
username
2020-05-07 20:53:48 +0300 (Thu, 07 May 2020)
53
ISSUE-148 Win В первом раунде
username
2020-05-07 20:53:48 +0300 (Thu, 07 May 2020)
53
ISSUE-148 Win {U+0412} {U+043F}{U+0435}{U+0440}{U+0432}{U+043E}{U+043C} {U+0440}{U+0430}{U+0443}{U+043D}{U+0434}{U+0435}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question