Problem with Persian_CI_AI collation And 'ك' character

淺唱寂寞╮ 提交于 2019-12-14 02:09:24

问题


I installed sql server 2008 enterprise and created a sample database whit Persian_CI_AI Collation. then from a visual studio 2010 windows application i insert the word "اسكندر" whith two type of 'ك'(arabic & Persian) but in the search time result show me just one 'اسكندر' . Please Help me


回答1:


you can this procedure in vb.net for your problem

''' <summary>
''' این روال در برطرف کردن مشکل جستجوی حروف عربی کاربرد دارد
''' مقدار خروجی حرف ی فارسی را با یاء عربی   جایگزین میکند
''' </summary>
''' <param name="strInputValue"></param>
''' <returns></returns>
''' <remarks></remarks>
Public Function Resolve_Arabic_Font_2(ByVal strInputValue As String) As String
    Dim strOutPut As String = ""
    If strInputValue.Trim <> "" Then
        strOutPut = Replace(strInputValue, "ی", Chr(237))
    Else
        strOutPut = strInputValue
    End If
    '---------------
    Return strOutPut
End Function



回答2:


Read the text and then change ك with ک also change search text with this method.



来源:https://stackoverflow.com/questions/3649421/problem-with-persian-ci-ai-collation-and-%d9%83-character

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!