Results 1 to 2 of 2

Thread: Unicode

  1. #1
    Join Date
    Jun 2003
    Location
    Singapore
    Posts
    20

    Question Unanswered: Unicode

    I have this lines of code...

    if UCASE(right(file.name,3))=".IN" Then

    'Response.write(file.name+"<BR>")
    filelocation=folder +"\"+ file.name
    Set objTextStream = fso.OpenTextFile(filelocation,1)
    sMsg = ""
    sFileText=objTextStream.ReadALL
    objTextStream.Close
    set objTextStream = Nothing

    for icurr = 1 to iMaxLength
    if mid(sFileText,icurr,1)=":" then
    sSMSC=mid(sFileText,1,icurr-1)
    'Response.Write("SMSC =" + sSMSC + "<Br>")
    sFileText = right(sFileText,len(sFiletext)-icurr)
    icurr = iMaxLength + 1
    end if
    NEXT
    for icurr = 1 to iMaxLength
    if mid(sFileText,icurr,1)=":" then
    sPhoneNo=mid(sFileText,1,icurr-1)
    'Response.Write("PhoneNo =" + sPhoneNo + "<Br>")
    sFileText = right(sFileText,len(sFiletext)-icurr)
    icurr = iMaxLength + 1
    end if
    NEXT
    for icurr = 1 to iMaxLength
    if mid(sFileText,icurr,1)=":" then
    sFormat=mid(sFileText,1,icurr-1)
    'Response.Write("Format =" + sFormat + "<Br>")
    sFileText = right(sFileText,len(sFiletext)-icurr)
    icurr = iMaxLength + 1
    end if
    NEXT
    'Response.Write(sFileText + "<Br>")
    If sFormat ="TXT" then
    Do while len(sFileText) > 1
    sMsg = sMsg + Hex2Char(left(sFileText,2))
    if Hex2Char(left(sFileText,2)) ="'" then sMsg=sMsg + "'"
    sFileText = mid(sFileText,3,len(sFileText)-2)
    Loop
    'Response.Write(sMsg + "<Br>")
    ELSE
    sMsg = "Unknown Text !"
    End if

    Those lines above are when the file .IN in TXT(TEXT). The problem is, now i want it to be UCS(UNICODE). The input for this program is by SMS(Short Message Service). If the user inputs normal text, it works perfectly.. But if lets say the user keys in chinese characters, it does not werk.. So can anyone help???? Plsss

  2. #2
    Join Date
    Feb 2002
    Location
    North Wales, UK
    Posts
    114
    You need to research unicode in relation to what you want to do with the unicode text.
    J^ - web | email
    newsASP Developer

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •