Loading
Clarify encoding behavior in repository files API docs
What does this MR do?
Adds documentation notes to clarify that the content field in the repository files and blobs API endpoints may be transcoded to UTF-8 for non-UTF-8 files. This addresses user confusion when API responses don't match git clone or the UI Download button.
Specifically, this MR:
- Updates
doc/api/repository_files.mdto note that for files not stored as valid UTF-8 (such as UTF-16 or latin-1):contentis transcoded to UTF-8 before Base64 encodingsizereflects the raw blob size, which may differ from the decoded content lengthcontent_sha256is computed from the transcoded content, not the raw blob
- Updates
doc/api/repositories.mdwith a similar note for the blobs endpoint - Points users to the
/rawendpoints for retrieving exact Git blob bytes
Related issues
Author's checklist
- Follow the:
- Not adding a new page, so product availability details not needed.
Reviewer's checklist
Documentation-related MRs should be reviewed by a Technical Writer for a non-blocking review, based on Documentation Guidelines and the Style Guide.
- If the content requires it, ensure the information is reviewed by a subject matter expert.
- Technical writer review items:
- Ensure docs metadata is present and up-to-date.
- Ensure the appropriate labels are added to this MR.
- Ensure a release milestone is set.
- Review by assigned maintainer.