I am trying to run a batch file with the following content:
netsh interface ip>set dns "Połączenie lokalne" source=dhcp
The file is saved as ANSI. My Windows codepage is 1250, the OEM one 852.
Thus, since Windows uses ANSI (ACP) while the console uses ASCII (OEMCP), the letters "ł" (B3) and "ą" (B9) [Windows-1250] get turned into "│" (B3) and "╣" (B9) [CP 852] respectively.
The attempt to *work around this**:
@echo off for /f "tokens=2 delims=:." %%x in ('chcp') do set cp=%%x chcp 1250>nul
netsh interface ip>set dns "Połączenie sieci bezprzewodowej" source=dhcp
chcp %cp%>nul
does not work. (Probably since netsh is a seperate interface?)
**as specified by Metalcoder here: https://stackoverflow.com/questions/7584423/problem-running-bat-cmd-file-with-accented-characters-in-it*
Any help would be greatly appreciated.