I'm calling a java program from a batch file with parameters to send an email, works fine except that the program won't accept Danish charters like Æ
, Ø
, Å
, (see fromCompanyName).
Batch file:
set host="smtp.xyz.com"
set username="[email protected]"
set password="Password42"
set FromCompanyName="Testing æøå"
set from="[email protected]"
So right now the 'From' in the email looks like this: Testing å ÿ à
If I use echo æøå
in batch file output: ├ª├©├Ñ
If I use echo æøå
in a command prompt output: æøå
CodePudding user response:
Try to use a text editor which is able to create unicode files and make sure to create your batch file using this editor.
I assume (set) you are using a Windows operating system? You may check out Notepad .
Open your Batch file and change the encoding using:
Encoding > Convert to UTF-8 (option without BOM)