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ULTXBVJKW5MVCTZ24R7Z52QMHO3HPDUVQC
EAZ45JTF44727P34UQAMIFQQTSXFKABIG4PLBGC7C7KQ74GUSDPAC
// TODO pass through the encodings and use that to decide
let mime_a = tree_magic_mini::from_u8(&d.contents_a);
let mime_b = tree_magic_mini::from_u8(&b);
debug!("mimes = {:?}, {:?}", mime_a, mime_b);
if (!mime_a.starts_with("text/") || !mime_b.starts_with("text/")) && d.contents_a != b {
// TODO pass through both encodings and use that to decide
if encoding.is_none() {
print_change_contents(w, changes, change, change_contents)?;
print_change_contents(w, changes, replacement, change_contents)?;
print_change_contents(w, changes, change, change_contents, encoding)?;
print_change_contents(w, changes, replacement, change_contents, encoding)?;
Regex::new(r#"^(?P<n>\d+)\. File addition: "(?P<name>[^"]*)" in "(?P<parent>[^"]*)"(?P<perm> [^ ]+)? "(?P<encoding>[^"]*)"#).unwrap();
Regex::new(r#"^(?P<n>\d+)\. File addition: "(?P<name>[^"]*)" in "(?P<parent>[^"]*)"(?P<perm> [^ ]+)? "(?P<encoding>[^"]*)""#).unwrap();