Failed to save merge conflicts resolutions

Summary

When I tried to resolve conflicts, then commit, the top of the page show the warning below

TIM图片20181031141700

Steps to reproduce

  1. Create one branch from another branch which named in English and name in Chinese;
  2. Create merge request when there have some conflicts between these two branches;
  3. Try to resolve conflicts, then commit.

Example Project

It can be reproduced in my test project.

What is the current bug behavior?

Failed to save merge conflicts resolutions.

What is the expected correct behavior?

Success to save merge conflicts resolutions.

Relevant logs and/or screenshots

"action": "resolve_conflicts",
"status": 500,
"error": "Encoding::UndefinedConversionError: U+8F6C from UTF-8 to ASCII-8BIT",

Output of checks

This bug happens on GitLab.com

Results of GitLab environment info

It can be reproduced in GitLab.com.So I think it is not neccssary to provide the environment info.

Results of GitLab application Check

Unless below, Everything is OK.

Running? ... rake aborted!
ArgumentError: invalid byte sequence in UTF-8
/opt/gitlab/embedded/service/gitlab-rails/lib/tasks/gitlab/check.rake:303:in `scan'
/opt/gitlab/embedded/service/gitlab-rails/lib/tasks/gitlab/check.rake:303:in `sidekiq_process_count'
/opt/gitlab/embedded/service/gitlab-rails/lib/tasks/gitlab/check.rake:266:in `check_sidekiq_running'
/opt/gitlab/embedded/service/gitlab-rails/lib/tasks/gitlab/check.rake:254:in `block (3 levels) in <top (required)>'
/opt/gitlab/embedded/bin/bundle:23:in `load'
/opt/gitlab/embedded/bin/bundle:23:in `<main>'
Tasks: TOP => gitlab:check => gitlab:sidekiq:check
(See full trace by running task with --trace)

Possible fixes

It like the issue.

Maybe fix here.

Edited by 🤖 GitLab Bot 🤖