FileLoader.setCandidateEncodings
void setCandidateEncodings(gtksource.encoding.Encoding[] candidateEncodings)Sets the candidate encodings for the file loading.
The encodings are tried in the same order as the list.
For convenience, candidate_encodings can contain duplicates. Only the first occurrence of a duplicated encoding is kept in the list.
By default the candidate encodings are (in that order in the list):
- If set, the
classFile's encoding as returned by [gtksource.file.File.getEncoding]. - The default candidates as returned by [gtksource.encoding.Encoding.getDefaultCandidates].
Parameters
candidateEncodings | a list of #GtkSourceEncoding<!-- -->s. |