Here you can find the source of toUtf8Path(String path)
public static String toUtf8Path(String path)
//package com.java2s; //License from project: Apache License import java.io.UnsupportedEncodingException; import java.nio.charset.Charset; public class Main { public static String toUtf8Path(String path) { try {//from w ww . j a v a2s. c om path = new String(path.getBytes("ISO-8859-1"), Charset.forName("UTF-8")); } catch (UnsupportedEncodingException e) { e.printStackTrace(); } return path; } }