|
-
Dec 30th, 2003, 10:24 AM
#1
[VB] Unicode
VB Code:
'convert to UTF-16
For A = 1 To Len(Temp) Step 2
Text = Text & ChrW(Asc(Mid$(Temp, A, 1)) + Asc(Mid$(Temp, A + 1, 1)) * 256)
Next A
Yup. If someone knows a better way, you'll become my hero. I want to make optimal code for the class module I'm working with, and this is the weakest code there atm.
-
Jan 22nd, 2004, 11:28 AM
#2
Write a DLL in C. VB's strings are UTF-16 internally, but accessing them that way...
You could try a fixed length string (length = Len(Temp) / 2), and the CopyMemory API call. Quite risky though.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|