I use grep to search for patterns which is working properly. However, when I redirect the output to any file, the output gets corrupted due to the encoding.
Is there a way to make the bash in windows output the file in normal UTF-8 encoding so normal text editors can read it properly?
EDIT: It looks like this when I redirect output the grep results to any file:
I'm running latest Windows and I have bash installed by using developer mode and enabling the bash.
The output gets messed up in the process. Even Windows version of linux text editors display the weird output. However, if I run cat on the file containing the weird output. It shows the output just fine with no issues.
I'm using Notepad++ to view the results.