Skip to content

Add support for non-UTF8 character set

Description

Currently, GitLab Runner only support UTF-8. This is rarely a problem with Linux.

However, on Windows, if the system locale is set to specific non-English languages, the default character becomes something other than UTF-8. For example, in the case of Japanese, it will be Shift-JIS.

As a result, Following issues happen:

  1. Non-English messages contained in built-in commands of Windows OS will be garbled.

    image.png

  2. Commit messages created in GitLab UI (encoded in UTF-8) causes unexpected behavior in the Runner. (This can be replicated by this commit message: 日本語のコミットメッセージのテスト)

    image.png

  3. If the characters in the message displayed by the user during the job process are encoded in non-UTF8, they will be garbled.

    image.png

(The "1" and "2" can be reproduced in posershell. No cases of reproduction have been found in pwsh. The "3" can be replicated in the both powershell and pwsh)

Proposal

  • I would propose to add support for non-UTF8 character sets.
  • In the meantime, add the following to the document: “You need to set system locale to English.”
    • This can avoid the problems 1 and 2 above.

Links to related issues and merge requests / references

!5473 (merged)

Edited by Kosuke Kamiya