jsp中文转换文件!
文件名:trans.jsp
<%!
String trans(String chi)
{
String result = null;
byte temp [];
try
{
temp=chi.getBytes("iso-8859-1");
result = new String(temp);
}
catch(java.io.UnsupportedEncodingException e)
{
System.out.println (e.toString());
}
return result;
}
String trans(Object chi)
{
return trans(chi.toString());
}
%>
<%!
String trans(String chi)
{
String result = null;
byte temp [];
try
{
temp=chi.getBytes("iso-8859-1");
result = new String(temp);
}
catch(java.io.UnsupportedEncodingException e)
{
System.out.println (e.toString());
}
return result;
}
String trans(Object chi)
{
return trans(chi.toString());
}
%>
lunzi
2004-12-21 19:03:28
评论:0
阅读:1068
引用:0
