SETHA SITE INFORMATION

  • Increase font size
  • Default font size
  • Decrease font size

How to Convert Khmer Unicode Data to Unicode Code in Visual Basic?

E-mail Print PDF
This article shows you Visual Basic code on how to convert Khmer Unicode Data into Unicode Code.
 
Function UnicodeString(ByVal str As String) As String
    Dim reVal As String
    Dim i As Integer
    For i = 1 To Len(str)
        reVal = reVal & AscW(Mid(str, i, 1))
    Next
    UnicodeString = reVal
End Function

Why we need this?

We need to convert Unicode Data to Unicode Code in Microsoft Access Table in order to enable sorting and searching of Khmer Unicode Data. As experiences with Khmer Unicode, we cannot sort or search in field which consist of Khmer Unicode data. Therefore, we need to convert those Khmer Unicode Data into Unicode Code and add to another new column which we can sort and search instead.