Pages

Monday, August 6, 2007

UCS-2 to Gb code

Function ReadC(HWord,TStartC)

for X= 0 TO (((Len(Trim(HWord))-TStartC)/4)-1)
ASplit = Mid(Replace(Right(HWord, Len(Trim(HWord))-TStartC), " ", ""),(4*X+1),4)

IF ASplit > "0000" and ASplit < "00FF" THEN
CText = Chr(CLng("&H" & ASplit))
ELSE
CText = Unescape("%u" & ASplit)
END IF

FText = FText & CText
Next

ReadC = Left(HWord, TStartC) & FText

End Function

No comments:

Post a Comment