Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

5
  • 3
    1) Does grep output any messages at all (to stderr) or absolutely nothing? 2) Does grep -a make it output any results? 3) Does head -1 Backup.sql | hexdump -C show the file being ASCII/UTF-8 or does it show the file being UTF-16 (with every other byte being a 0x00 byte)? Commented Mar 11, 2025 at 11:02
  • I this usefull for you? Commented Mar 11, 2025 at 11:13
  • grep doesn't have any file size limits so far as I know. It is far more likely an encoding issue. There are probably a lot of UTF-16, UTF-32 and even UTF-8 code points whose glyph looks like S. Classic grep tends to assume ASCII encoding, Commented Mar 11, 2025 at 12:08
  • As you guys can see, the file is UTF-16 indeed. My grep is an alias (alias grep='grep -aI --color=auto'), so indeed I'm using the -a switch. Commented Mar 11, 2025 at 12:23
  • 1
    I think you have some multybyte encoding but it is not UTF-8, so regular "ascii" letters are not encoded as regular ASCII at all (and the multiple occurence of "\0" in your file terminate the line for grep before it could see a "S" in it). I'll let this here ... utf8everywhere.org Commented Mar 12, 2025 at 12:48