|
-
Jun 8th, 2015, 04:58 AM
#1
Thread Starter
Frenzied Member
[RESOLVED] AscW returns negative value
For some CJK Characters, AscW returns negative value. It's nothing wrong because AscW returns integer, The negative value can add 65536 to convert to UTF-32 (Long Type). But I am not sure whether it is always true. What I know is that Unicode numbers occupy a 16-bit positive range from 0 to 65535 (0xFFFF), and cannot be negative. But someone said the supported character code range is from 0 to 1114110. For this case, adding 65536 is no more correct. Please advice what is the solution in VB6?
In C# and JAVA, We just simply write:
Char uniChar = '者';
int ascw;
ascw = (int)uniChar; // uniChar 64091 '者' char 0xfa5b
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
|