|
-
Dec 22nd, 2018, 10:08 AM
#11
Re: [vb6] Project Scanner
The above posts help.
I am assuming you cannot name a variable or object (like a control) using Chinese characters. Is that correct? Reason for this is that VB specifically says that variables (really any vb code item) must begin with ANSI alphabet, i.e., A-Z, a-z. Other stuff might be allowed, like literals and comments.
Edited: If my latest assumptions are correct, then changing the project will not be difficult at all.
And as for the idea of trying to display in the treeview the intended characters (like Chinese) on any system will be abandoned. Though it may be possible (maybe not) to be 100% sure if DBCS is used or not, it isn't worth the effort I think. I doubt Chinese have the only DBCS locale so one would have to know which locale the files originated from to properly display any character as intended. Would have been nice, but oh well. Even NotePad punted on dreammanor's vbp file, defaulting to ANSI format.
 Originally Posted by Elroy
But it does seem that that's necessary if languages like Chinese are going to be correctly handled. If you're attempting to treat all source files as single-byte-characters, that's not going to work in the ANSI-MBCS cases.
Actually, that's the opposite of what I wanted. I better understand DBCS now: kinda like ANSI + "unicode" combined into a single format, from cyberactivex site
DBCS is actually not the correct terminology for what Windows uses. It is actually MBCS where a character can be 1 or 2 bytes. To illustrate this consider the following code which will take a Unicode string of English and Chinese characters, convert to a byte array of MBCS Chinese, dump the byte array to the immediate window, and finally convert it back to a Unicode string to display in a Unicode aware textbox. The byte array when converted using Chinese(PRC) LCID = 2052 contains single bytes for the english characters and double bytes for the Unicode characters.
sUni = "2006" & ChrW$(&H6B22) & "9" & ChrW$(&H8FCE) & "12" & ChrW$(&H6B22) & " 8:04"
Last edited by LaVolpe; Dec 22nd, 2018 at 11:43 AM.
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
|