Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

International characters in a batch file

Hey, I'm having some problems writing a batch file where I need to specify some file paths containing international characters (the norwegian letter 'ø' to be exact).

For example, the filename axporteføljedb.vbp (which looks normal in notepad) turns into axportef°ljedb.vbp on the command line, which the system then goes on to complain about not finding.

Any suggestions?

like image 259
Rune Aamodt Avatar asked Oct 13 '22 19:10

Rune Aamodt


1 Answers

It will work if you save your batch file as ANSI with a Norwegian character set (with Notepad++ for example). Then, in the cmd, when you want to run your batch file, first change the code page to something that supports Norwegian: chcp 1252 (in the console).

like image 163
Andrei Pana Avatar answered Oct 18 '22 01:10

Andrei Pana