1、
public static String[] readTXTFile2Sentence(File file) throws IOException
{InputStream fis=new FileInputStream(file);
InputStreamReader isrUnicode = new InputStreamReader(fis, "Unicode");
BufferedReader brUnicode = new BufferedReader(isrUnicode);
String line = brUnicode.readLine();
String tmp="";
while(line != null)
{
line=line.trim();
tmp=tmp+line;
line = brUnicode.readLine();
}
String[] strArray=tmp.split("。");
return strArray;
}
2、
String temp1=(String)request.getAttributes().get("keyword");
String newstr1=java.net.URLDecoder.decode(temp1, "utf-8");
this.keyword=newstr1;