# 抓出Unicode的秘诀!

Posted by 中文化软体联盟~Hank on October 27, 1998 at 11:55:37:

###
Dim unicode As String
Dim A(1 To 150000) As Byte
If Text1.Text <> "" And Text2.Text <> "" Then
Open Text1.Text For Binary As #1
Open Text2.Text For Output As #2
fil = LOF(1)
i = 10241
Do While i < fil
Get #1, i, A()
n = 1
unicode = ""
Do While n < 150000
aa = 0

aa = A(n)
BB = A(n + 1)

If BB = 0 Then

If aa > 31 And aa < 127 Then
unicode = unicode + Chr(A(n))
n = n + 2
Else
If unicode <> "" And LenB(unicode) > 4 And aa <= 30 Then
g = g + 1
Label3.Caption = g

zz = n - (Len(unicode) * 2) + i - 1

Print #2, unicode
Print #2, unicode
Print #2, LTrim(RTrim(zz))
End If
unicode = ""
n = n + 2

End If

Else
n = n + 1
unicode = ""
End If
Loop
i = i + 150000
Loop
Close

x = MsgBox("抓取完成 !")

Dim RetVal

RetVal = Shell("notepad " + Text2.Text, 1)

End If

- 中文化

Follow Ups: