Skip to content

Conversation

anmarchenko
Copy link
Member

What does this PR do?
Fixes an issue with emojis in git commit message.

Sometimes Ruby sets default external encoding to US_ASCII even thou LANG is "en_US.UTF-8". In these cases non-ASCII characters like emojis break LocalGit provider.

In order to mitigate that, I force UTF-8 encoding if external encoding is US-ASCII. It is safe to do as UTF-8 is backwards compatible with US-ASCII.

Motivation
Fixing bug report

How to test the change?
By running unit tests

@anmarchenko anmarchenko requested review from a team and juan-fernandez October 2, 2023 14:23
@anmarchenko anmarchenko merged commit f3be2c5 into main Oct 4, 2023
@anmarchenko anmarchenko deleted the anmarchenko/commit_emoji_issue_fix branch October 4, 2023 06:38
@github-actions github-actions bot added this to the 0.2.0 milestone Oct 4, 2023
@ivoanjo
Copy link
Member

ivoanjo commented Oct 4, 2023

Thanks for fixing this so I can litter commit messages with emoji again 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants