Reading Windows Environment Variable (Encoding/Charset Issue)
<p>what I wanna do is read the Windows environment variable %APPDATA%. I have some severe problems with Umlauts though e.g. if APDATA is set to <code>"ÄÄÄ"</code> I ll get sth like <code>"'''"</code>.</p>

<p>Here is my code:</p>

<pre><code>final Process p = Runtime.getRuntime().exec("cmd.exe /C echo %APPDATA%");
final BufferedReader br = new BufferedReader(new InputStreamReader(p.getInputStream()));
String buffer;
if((buffer = br.readLine()) != null) {
    return buffer;
}
</code></pre>

<p>If I print out</p>

<pre><code>String encoding_system = System.getProperty("file.encoding");
</code></pre>

<p>I'm getting <code>Cp1252</code>. I tried to tell the InputStreamReader the system encoding, but nothing changes.</p>
