Created
December 25, 2014 07:52
-
-
Save Manjago/4e8b3d039c439977b7c8 to your computer and use it in GitHub Desktop.
читаем проперти в utf8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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