java encoding file in windows-1252 appears Big5 in notepad++ -


i'm facing problem when write files encoding "windows-1252" : don't know when sometimes, files encoded in big5 (chenese). control encoding in notepad++

for exampe, string "¤idparam¤vidproduit1¤¤idparam2¤v2¤v" encoded (in windows-1252 file) string "¤¤idparam¤vidproduit1¤¤idparam2¤v2¤v" not !

i testing eclipse mars , jdk1.8.0_92.

my code test :

  @test public void testfichier() throws exception {     file file1 = new file("target/file_ko.txt");     writer writer1 = files.newbufferedwriter(file1.topath(), charset.forname("windows-1252"));     writer1.write("¤¤idparam¤vidproduit1¤¤idparam2¤v2¤v");// ko     writer1.close();      file file2 = new file("target/file_ok.txt");     writer writer2 = files.newbufferedwriter(file2.topath(), charset.forname("windows-1252"));     writer2.write("¤idparam¤vidproduit1¤¤idparam2¤v2¤v");// ok     writer2.close();  } 

the file "file_ok.txt" "ansi" in notepad++ whereas file "file_ko.txt" "big5 traditional" in notepad++

i have tested lots of cases didn't identify problem, strange...

thanks help.


Comments

Popular posts from this blog

asynchronous - C# WinSCP .NET assembly: How to upload multiple files asynchronously -

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -