l1t
新手上路
积分 8
发帖 4
注册 2009-9-18
状态 离线
|
『第
220 楼』:
研究成功了
case when trunc(ascii(substr(hz,n,1))/256) between to_number('A1','XX') and to_number('F7','XX')
and mod(ascii(substr(hz,n,1)),256) between to_number('A1','XX') and to_number('FE','XX') then --gb2312
substr(dbms_lob.substr(bin_data,32,(94*(trunc(ascii(substr(hz,n,1))/256)-161)+
(mod(ascii(substr(hz,n,1)),256)-161))*32+1),l*4-3,4)
when mod(ascii(substr(hz,n,1)),256) between to_number('A1','XX') and to_number('FE','XX') then --81~a0 's a1-fe
substr(dbms_lob.substr(bin_data,32,267616+32*3+(94*(trunc(ascii(substr(hz,n,1))/256)-124)+
(mod(ascii(substr(hz,n,1)),256)-161))*32+1),l*4-3,4)
else --81~fe's 40~7e 80~a0
substr(dbms_lob.substr(bin_data,32,267616+32*3+(160-128)*94*32-10*32+(96*(trunc(ascii(substr(hz,n,1))/256)-124)+
(mod(ascii(substr(hz,n,1)),256)-64-trunc(mod(ascii(substr(hz,n,1)),256)/128)))*32+1),l*4-3,4)
end line
|
|