Here you can find the source of fileNameEncode(String fileName)
public static String fileNameEncode(String fileName)
//package com.java2s; //License from project: Open Source License public class Main { public static String fileNameEncode(String fileName) { if (fileName == null) return null; try {//from www . j a va 2 s .c om return new String(fileName.getBytes("gbk"), "ISO-8859-1"); } catch (Exception ex) { return fileName; } } }