|
-
Jul 24th, 2001, 11:05 PM
#1
Thread Starter
Fanatic Member
Unicode in VB
Can VB display VB code ? I want to set some unicode to the menu and label caption. If someone know, please help.
Regards.
-
Jul 24th, 2001, 11:36 PM
#2
Registered User
AFAIK, VB6 fully supports unicode data.
-
Jul 24th, 2001, 11:40 PM
#3
Fanatic Member
Yes indeed. Unicode is the default for VB. If you use the following code, you'll see that this is the case:
Code:
Dim Test As String
Dim Test2() As Byte
Test = "This is a test of VB's Unicode!"
Test2 = Test
For X = 0 To UBound(Test2)
MsgBox Test2(X)
Next X
See all the entries that equal 0? That's the first half of the double byte unicode character. IE: 0 followed by 32 is the unicode ascii code 032 which corresponds to the space character. (or more precisely 000 032, Hex &0032)
-
Jul 24th, 2001, 11:46 PM
#4
PowerPoster
check out the ascw(string) function.
That might help you do what you need.
-
May 27th, 2002, 05:46 AM
#5
See all the entries that equal 0? That's the first half of the double byte unicode character. IE: 0 followed by 32 is the unicode ascii code 032 which corresponds to the space character. (or more precisely 000 032, Hex &0032) [/B]
0x0032 = 50! The character should be 0x0020 (for space)! Sorry to be so picky, but I thought it might be confusing.
-
May 27th, 2002, 06:10 AM
#6
VB actually use a mutex between Unicode and ANSI strings.
It handles all strings internally in memory using Unicode however all string functions use ANSI strings so VB converts back and forth between them.
Also VB always pass a string to an API function as ANSI that's why we always use all the xxxA functions instead of the xxxW versions.
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
|