If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > Unicode

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-25-03, 22:04
Yusrin Yusrin is offline
Registered User
 
Join Date: Jun 2003
Location: Singapore
Posts: 20
Question 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
Reply With Quote
  #2 (permalink)  
Old 07-01-03, 04:57
JonathanB JonathanB is offline
Registered User
 
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
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On