On Monday, 1 October 2018 at 15:21:24 UTC, helxi wrote:
I tried out https://dlang.org/library/std/utf/validate.html
before manually checking for encoding myself so I ended up with
the code below. I was fairly surprised that "*.o" (object)
files are UTF encoded! Is it normal?
Yes. Any random
On Sunday, 30 September 2018 at 03:19:11 UTC, Adam D. Ruppe wrote:
On Saturday, 29 September 2018 at 23:46:26 UTC, helxi wrote:
Thanks. Would you say
https://dlang.org/library/std/encoding/get_bom.html is useful
in this context?
Eh, not really, most text files will not have one.
Hi,
I
On Saturday, 29 September 2018 at 15:52:30 UTC, helxi wrote:
I'm writing a utility that checks for specific keyword(s) found
in the files in a given directory recursively. What's the best
strategy to avoid opening a bin file or some sort of garbage
dump? Check encoding of the given file?
If
On Saturday, 29 September 2018 at 23:46:26 UTC, helxi wrote:
Thanks. Would you say
https://dlang.org/library/std/encoding/get_bom.html is useful
in this context?
Eh, not really, most text files will not have one.
On Saturday, 29 September 2018 at 16:01:18 UTC, Adam D. Ruppe
wrote:
On Saturday, 29 September 2018 at 15:52:30 UTC, helxi wrote:
I'm writing a utility that checks for specific keyword(s)
found in the files in a given directory recursively. What's
the best strategy to avoid opening a bin file
On Saturday, 29 September 2018 at 15:52:30 UTC, helxi wrote:
I'm writing a utility that checks for specific keyword(s) found
in the files in a given directory recursively. What's the best
strategy to avoid opening a bin file or some sort of garbage
dump? Check encoding of the given file?
I'm writing a utility that checks for specific keyword(s) found
in the files in a given directory recursively. What's the best
strategy to avoid opening a bin file or some sort of garbage
dump? Check encoding of the given file?
If so, what are the most popular encodings (in POSIX if that