Skip to main content

looks_binary

Function looks_binary 

Source
pub fn looks_binary(data: &[u8]) -> bool
Expand description

Whether bytes that are not UTF-8 would be refused as binary by decode_text: a NUL, or more C0 controls than a text file carries. A writer that puts text back in a legacy code page checks its output with this, so a merge never writes a file that the same extract refuses.