Using the git api to create the file with the encoding CP-1251

Use gitlab api
https://docs.gitlab.com/ee/api/commits.html#create-a-commit-with-multiple-files-and-actions
Create a file in a git repository using the parameters
param = {
“branch”: branch_name,
“commit_message”: comment,
“actions”: [{
“action”: “create”,
“file_path”: file_path,
“content”: file_content,
“encoding”:“text”
}]
}
file_content python string (binary data). The file is created in UTF-8 encoding, you need in CP-1251,
who will tell you how to do it and is it possible???