The files created by 'Create or update file contents' API are missing encoding

The files created by ‘Create or update file contents’ API is missing encoding
I’m using this API:

https://docs.github.com/en/rest/reference/repos#create-or-update-file-contents

The content is OK. It’s just missing the encoding info, so large files couldn’t be rendered in github website and are showing as “RAW” or “Binary file”
If you open those files in a editor like notepad++, you will find encoding is empty.

Is there a workaround to set the encoding?

Problem is resolved. I use “blob => tree => commit => update ref” now.