pub(super) fn read_local_file(
path: &str,
) -> Result<CommandReadEditorFileResult, String>Expand description
Reads the bytes and detects the encoding (BOM, then UTF-8, then a heuristic), decoding to UTF-8 for the editor, so non-UTF-8 files (Windows-1252 .ini, UTF-16, Shift_JIS, …) open instead of erroring.