larrywee
02-10-2008, 06:46 PM
I have enabled chinese characters in my regional settings and tested entering chinese characters in notepad.
However, when I entered the chinese characters in VB6 code window, all I get is ???? (one question mark for each character).
How do I enable VB6 to display the chinese characters as it is?
Any help will be much appreciated.
Thank you.
mkaras
02-10-2008, 07:50 PM
Just a silly question.....do you have the font of the control where you are trying to display these characters set to a font that contains Chinese characters?
larrywee
02-10-2008, 08:25 PM
Yes I do have the fonts. I am able to display the chinese text in Notepad but not in VB6. This is part of the code to be sent to to a barcode printer:
S=S+Chr$(27)+"H0005"+Chr$(27)+"V0065"+Chr$(27)+"K9B"+"批次代码:"
instead I get
S=S+Chr$(27)+"H0005"+Chr$(27)+"V0065"+Chr$(27)+"K9B"+"????:"
Any idea how I can resolve that?
Thank you
dilettante
02-10-2008, 10:12 PM
I always wondered about Asian locales and VB. There is a lot in the documentation about "double byte character sets" and such, and warnings that some functions don't work with some options when you have a western locale set.
It always made me wonder if there were special versions of VB compiled for Asian use.
At least in the version of VB I have you can't put anything in a string literal that isn't part of the current codepage. I assume that means whatever locale you have set you can only use symbols that map into the 8-bit character set (minus control characters).
The only real workaround I can think of is to use Unicode resource strings. At least that gets them compiled into the program without having to use a lot of Chr$() with Unicode numeric equivalents.