Handle non-UTF-8 conflicts gracefully
What does this MR do?
If a conflict file isn't in a UTF-8-compatible encoding, we can't resolve it in the UI.
Are there points in the code the reviewer needs to double check?
Is the regex the best way of doing this?
Why was this MR needed?
It's a bug in a new feature
What are the relevant issue numbers?
Closes #21247 (closed).