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

Use gitlab api
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,
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???