My batch file started to write output to log file in Chinese. Code:
echo ============= >> D:\path\file.log
echo. >> D:\path\file.log
echo. >> D:\path\file.log
echo Import new data to table %date% D:\path\file.log
sqlcmd -S (local)\sqlexpress -E -d DB_Name -Q "exit(exec[dbo].[StoredProcedure])" >> D:\path\file.log
It worked fine for many months and all of a sudden it started to write the whole output in weird format like here:
㴽㴽㴽㴽㴽㴽‽ഠ 浉潰瑲渠睥搠瑡潴匠䍒剟䵅䑅彙䅒⁗慴汢㤰〯⼲〲㘱ഠ 㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽ഠ刊浥摥⁹慄慴䰠湡楤杮娠湯㩥㐨㌶㔰爠睯晡敦瑣摥ഩ
I saw this related question but it refers to a specific command issue as far as I understand. I would appreciate your help.
EDIT: After creating the batch file from scratch, the problem disappeared. Still don;t know what was the issue.