Display French or Chinese characters RRS feed

  • Question

  • User-169588073 posted


    I am having problem with French Characters in my asp.net app. I found this function in another post on asp.net forums. I am wondering how  I can use this funtion to fix problem with French characters? My question is what is code 936 in line

    Dim encGBK as Sytem.Text.Encoding = Sytem.Text.Encoding.GetEncoding(936)

    Is it specific to chinese? What can I use for French?

    Function ToSCUnicode(ByVal str As String) As String
    Dim enc1252 as System.Text.Encoding = System.Text.Encoding.GetEncoding(1252)
    Dim arrByte_GBK as Byte()
    Dim arrByte_UTF16 as Byte()
    Dim encGBK as Sytem.Text.Encoding = Sytem.Text.Encoding.GetEncoding(936)
    Dim encUTF16 as System.Text.Encoding = System.Text.Encoding.Unicode
    Dim strUTF16 as String
    arrByte_GBK = enc1252.GetBytes(str)
    arrByte_UTF16 = System.Text.Encoding.Convert(encGBK, encUTF16, arrByte_GBK)
    strUTF16 = encUTF16.GetString(arrByte_UTF16)
    return strUTF16
    End Function

    Thanks for help!

    Thursday, May 12, 2005 2:41 PM

All replies