Module gix_filter::worktree
source · Expand description
change encodings based on the working-tree-encoding attribute.
Worktree encodings are powered by the encoding_rs crate, which has a narrower focus than the iconv library. Thus this implementation
is inherently more limited but will handle the common cases.
Note that for encoding to legacy formats, additional normalization steps can be taken, which we do not yet take unless there is specific examples or problems to solve.
Modules
Functions
- Decode
srcaccording tosrc_encodingtoUTF-8for storage in git and place it inbuf. Note that the encoding is always applied, there is no conditional even ifsrc_encodingalready isUTF-8. - Encode
src_utf8, which is assumed to be UTF-8 encoded, according toworktree_encodingfor placement in the working directory, and write it tobuf, possibly resizing it. Note that the encoding is always applied, there is no conditional even ifworktree_encodingand thesrcencoding are the same.