String strCommand = "iconv -f GB2312 -t UTF-8 "+ strFileName1+" -o "+strFileName;
//String[] strCommand = {"/bin/bash /usr/bin/iconv -f GB2312 -t UTF-8 " + strFileName1+" -o "+strFileName};
System.out.println(strCommand);
Runtime rt = Runtime.getRuntime();
Process proc = rt.exec(strCommand);
InputStream stderr = proc.getErrorStream();
InputStreamReader isr = new InputStreamReader(stderr);
BufferedReader br = new BufferedReader(isr);
String line = null;
System.out.println("<ERROR>");
while ( (line = br.readLine()) != null)
System.out.println(line);
System.out.println("</ERROR>");
int exitVal = proc.waitFor();
//String[] strCommand = {"/bin/bash /usr/bin/iconv -f GB2312 -t UTF-8 " + strFileName1+" -o "+strFileName};
System.out.println(strCommand);
Runtime rt = Runtime.getRuntime();
Process proc = rt.exec(strCommand);
InputStream stderr = proc.getErrorStream();
InputStreamReader isr = new InputStreamReader(stderr);
BufferedReader br = new BufferedReader(isr);
String line = null;
System.out.println("<ERROR>");
while ( (line = br.readLine()) != null)
System.out.println(line);
System.out.println("</ERROR>");
int exitVal = proc.waitFor();
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货