A brother who is into crypto before me have lost a good amount of Bitcoin because he downloaded an editor and try to edit ( he claimed it was a mistake) the .dat wallet file, I am glad he gave up this information after several days of pain have passed.
Your brother have chance to recover his Bitcoin. See this short guide.
If your wallet.dat came out corrupted, you can make a copy of it and try to use Bitcoin Core's bitcoin-wallet tool's "salvage" command.
Install Bitcoin Core and find it in "bin" or "daemon" folder inside Bitcoin Core's install directory.
Use your terminal/cmd, cd to that directory and use the salvage command, e.g.: bitcoin-wallet --wallet="Full\path\to\your\wallet.dat" salvage
Make sure he do it only on offline/secure device.
You cannot overwrite your wallet file unless you click "Save" in the text editor.
But i wouldn't be surprised if there are editor that automatically change thing (such as editing metadata or encoding) when you open it, which may cause the corruption.