txt文本数据导入dw乱码解决方法

 txt文本数据导入dw乱码,基本都是字符编码问题,此处给出utf-8转pb编码的示例代码,至于nvo_string对象,可找我要或自行度娘或者csdn下载链接:nvo_string.sru-医疗文档类资源-CSDN下载


string ls_filterpath,ls_temp,ls_writepath
long li_filenum,ll_writenum,ll_sign=1
blob lb_temp
nvo_string		lnv_str
ls_filterpath = GetCurrentDirectory()+"\"+as_folder+"\"+as_filename

//ls_writepath = GetCurrentDirectory()+"\"+as_folder+"\temp.txt"
li_filenum = FileOpen(ls_filterpath, LineMode!)

if li_filenum >0 then
	do while FileRead(li_filenum, ls_temp) >0 
		ls_temp = lnv_str.of_utf8_asni(blob(ls_temp))
		//FileWrite(ll_writenum,ls_temp)
		ls_temp =uf_delquestion(ls_temp)
		adw_dw.ImportString(ls_temp)
	LOOP
end if
FileClose(li_filenum)

//FileClose(ll_writenum)
//adw_dw.importfile(ls_filterpath)

return true

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值