Follow-up from "Fix Changelog error on Non-encoded Commit Trailers"
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
The following discussion from !158191 (merged) should be addressed:
-
@stanhu started a discussion: (+2 comments) I wonder if we should use
encode_utf8_no_detect
instead to get more deterministic output.encode!
tries to detect the encoding, but from a short trailer it may not be able to determine the encoding.I see the added test only tries to convert some ASCII-8BIT value, but we ought to consider what happens if someone uses a completely different encoding.
encode!
might add--broken encoding
to the trailer: https://gitlab.com/gitlab-org/gitlab/-/blob/23fe84143c7a235d3feca0d4da8bffa313f1f569/lib/gitlab/encoding_helper.rb#L21-41
Edited by 🤖 GitLab Bot 🤖