Skip to content

Instantly share code, notes, and snippets.

@Manjago
Created December 25, 2014 07:52
Show Gist options
  • Save Manjago/4e8b3d039c439977b7c8 to your computer and use it in GitHub Desktop.
Save Manjago/4e8b3d039c439977b7c8 to your computer and use it in GitHub Desktop.
читаем проперти в utf8
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.nio.charset.Charset;
import java.util.Properties;
public class Toster {
public static void main(String[] args) throws IOException {
Properties p = new Properties();
p.load(new InputStreamReader(new FileInputStream("D:\\tmp\\test.properties"), Charset.forName("UTF8")));
System.out.println(p);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment