Skip to content

Fix encoding of command output #301

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed

Conversation

cschramm
Copy link

With the current solution and on Ruby 2.2 all non-ASCII are replaced even if they are valid UTF-8. I guess that solution works on Ruby 1.9 as the default encoding changed in 2.0, but I did not try that.

It looks like I'm not the only one experiencing the issue, see e.g. #295.

kamaradclimber added a commit to kamaradclimber/ruby-git that referenced this pull request Dec 7, 2016
Before this patch, we always assumed the string was ascii-8bit which
does not work correctly with real utf8 strings (french accented chars or
chineese chars).

This patch tries to use the string as utf8 and fallback if necessary to
the the ascii-8bit assumption if necessary.

This should help with ruby-git#295 and might replace the need for ruby-git#301.

Change-Id: Idac63fa10e5aefafa1eb99a6be4138cac5f90ea0
@voxik voxik mentioned this pull request Sep 12, 2017
@stale
Copy link

stale bot commented Apr 1, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Apr 1, 2018
@stale stale bot closed this Apr 8, 2018
@cschramm
Copy link
Author

For reference: A similar fix got merged in #327.

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.

1 participant