{}
package com.javarush.task.task22.task2211;
import java.io.*;
import java.nio.charset.Charset;
import java.nio.file.Files;
import java.util.Collection;
import java.util.Iterator;
import java.util.List;
import java.util.ListIterator;
/*
Смена кодировки
*/
public class Solution {
public static void main(String[] args) throws IOException {
byte[] bytes = Files.readAllBytes(new File(args[0]).toPath());
Files.write(new File(args[1]).toPath(), new String(bytes,Charset.forName("Windows-1251")).getBytes(Charset.forName("UTF-8")));
/* Charset win = Charset.forName("Windows-1251");
Charset utf = Charset.forName("UTF-8");
File file = new File(args[0]);
byte[] b = Files.readAllBytes(file.toPath());
String s = new String(b,win);
b = s.getBytes(utf);
File file1 = new File(args[1]);
Files.write(file1.toPath(),b);*/
}
}