社区
Web 开发
帖子详情
感谢net_lover解决框架关闭问题.
lijunjiejava
2004-10-19 11:17:18
rt
...全文
67
3
打赏
收藏
感谢net_lover解决框架关闭问题.
rt
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
3 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
lijunjiejava
2004-11-22
打赏
举报
回复
用poi的HSSF组件将汉字写入EXCEL中出现乱码的问题我已经解决了。
写了一个方法,调用一下就可以了。方法的源代码如下:
public static String getUnicode(String toEncoded,String encoding)
{
String retString="";
if(toEncoded.equals("")||toEncoded.trim().equals(""))
{
return toEncoded;
}
try
{
byte[] b=toEncoded.getBytes(encoding);
sun.io.ByteToCharConverter convertor=sun.io.ByteToCharConverter.getConverter(encoding);
char [] c=convertor.convertAll(b);
for(int i=0;i<c.length;i++)
{
retString+=String.valueOf(c[i]);
}
}catch(java.io.UnsupportedEncodingException usee)
{
System.out.println("不支持"+encoding+"编码方式");
usee.printStackTrace();
}catch(sun.io.MalformedInputException mfie)
{
System.out.println("输入参数无效!!!");
mfie.printStackTrace();
}
return retString;
}
使用方法为:
cell=row.createCell((short)2);
cell.setCellType(HSSFCell.CELL_TYPE_STRING);
cell.setEncoding(HSSFCell.ENCODING_UTF_16);
String temp="中央人民广播天台3台";
temp=getUnicode(temp,"gb2312");
cell.setCellvalue(temp);
lijunjiejava
2004-11-22
打赏
举报
回复
server.xml找到
<Host name="localhost" appBase="webapps"
unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">
紧接着下面添加
<Context path="" docBase="E:\myJSP\" debug="0" reloadable="true" />
修改你想要的路径就行了 !
孟子E章
2004-10-19
打赏
举报
回复
不用客气,以后有问题尽管贴
网络编程 TCP电子网络词库
//
关闭
数据库 if(sqlite3_close(dp) != SQLITE_OK) { fprintf(stderr,"[%s]sqlite3_open [%d][%s]__%d__\n",\ argv[1],sqlite3_errcode(dp),sqlite3_errmsg(dp),__LINE__); return -1; } printf(...
网络编程_8(项目附件)
dict.txt abandonment n.放弃 abbreviation n.缩写 abeyance n.缓办,中止 abide v....ability n....able adj....abnormal adj....aboard adv....abolish v....abolition n....abortion n....abortive adj....about prep....ab
out.txt
感激,
感谢
,感恩 abstract a.抽象的 n.摘要 bosom n.胸,胸部;内心 grip vt.握紧,抓牢 n.紧握 gross a.总的;严重的 guidance n.引导,指导,领导 gulf n.海湾 gunpowder n.黑色火药;有烟火药 bottom n.底,底部...
简单英译汉SQL脚本
create table t_dictionary(word varchar(200), trans varchar(1000)); insert into t_dictionary values('abandon','v.抛弃,放弃'); insert into t_dictionary values('abandonment','n.... insert into t_...
【转】JS大总结(带实例)
框架
名.对象 把握
框架
页面 return return false 返回值 random 随机参数(0至1之间) reset() form.reset(); 使form表单内的数据重置 split("") string.split("") 将string对象字符以逗号隔开...
Web 开发
81,091
社区成员
341,718
社区内容
发帖
与我相关
我的任务
Web 开发
Java Web 开发
复制链接
扫一扫
分享
社区描述
Java Web 开发
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章