Is there a crate in @rustlang to determine whether a file is a binary or a text file?
-
-
Looks like this work welll, thanks!
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
Rough experiments suggest this is about 5% of ripgrep's runtime over a single large file. (compare `rg <pattern> <file> -c --no-mmap` with `rg <pattern> <file> -c --no-mmap -a`.)
-
UTF-8 can contain any bytes other than FE / FF, but any high bytes (80-FD) have to be in very specific patterns. UTF-16 can contain any bytes, but some sequences are illegal (split surrogates). But yeah both are *unlikely* to contain any C0 control codes other than \t\r\n.
End of conversation
New conversation -
-
-
That's what Git does too.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
Wow, that's smart.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.