我对 Windows 搜索引擎有一个奇怪的问题。当我在 Windows 10 开始菜单搜索栏中搜索希腊词 Όρος 时,我得到了预期的结果。
当我通过 VB.Net 搜索时,找不到任何结果。我已将问题缩小到最后一个字母“ς”。删除它可以让搜索成功。任何人都知道问题可能是什么?
Dim t As String
t = UCase("Όρο") ' success
't = UCase("Όρος") ' fails
Dim connection = New OleDbConnection("Provider=Search.CollatorDSO;Extended Properties=""Application=Windows""")
Dim query1 = "SELECT System.ItemName FROM SystemIndex " +
"WHERE System.ItemName LIKE '%" & t & "%'"
connection.Open()
Dim Command = New OleDbCommand(query1, connection)
Dim r
Try
r = Command.ExecuteReader
Catch
Debug.WriteLine("Search failed!")
Return
End Try
Dim c = 0
While (r.Read())
c += 1
Debug.WriteLine(r(0))
End While
Debug.WriteLine("Total:" & c)