將以下代碼貼到Basic IDE即可使用


Function HEX2UNICHAR(Hex as String) as String
	Dim uc&,i&,L&,str$,t&
	L=Len(Hex)
	if L>6 then
		L=6
	end if
	For i=1 To L 
		t=asc(Mid(Hex,i,1))
		if 48<=t and t<=57 then
			t=t-48
		elseif 65<=t and t<=70 then
			t=t-65+10
		elseif 97<=t and t<=102 then
			t=t-97+10
		else
			Exit For
		end if
		uc=(uc*16)+t
	Next i

	if uc < &h10000 then
		str=Chr(uc)
	else
		uc=uc - &h10000
		str=Chr(uc \ &h400 + &hD800) & Chr(uc Mod &h400 + &hDC00)
	end if
	HEX2UNICHAR=str
End Function
arrow
arrow
    全站熱搜
    創作者介紹
    創作者 ren1244 的頭像
    ren1244

    ren1244的部落格

    ren1244 發表在 痞客邦 留言(0) 人氣()