Java utils.Properties how to ignore char spec

I am editing a notepad cfg.prop file

cfg.prop:

key = value

my code:
    Properties prop = new Properties();
    prop.load(new InputStreamReader(new FileInputStream("etc/agent.prop"), "UTF-8"));
    System.out.println(prop);

then i see in stdout {? key = val} so that the notepad saves the UTF-8 file with the specification character (efbbbf) how to ignore this character? I am using java6u21

+4
source share
1 answer

There are several options in this question / answer that I think may help here.

Byte icon twists reading file in Java

0
source

All Articles