Multi Language Software
Softwarebuero Jollans
This is Tikiwiki v2.2 -Arcturus- © 2002–2008 by the Tiki community
Wed 08 of Sept., 2010 19:47 CEST
Why do strings appear as ???This article applies to VB6 applications using non western (e.g. Chinese, Japanese, Korean) characters. The question that I am most often asked with regard to VB6 localization, is why texts sometimes appear as question marks, as in the following example. ![]() This effect happens with all of the built-in VB controls (Labels, Text-Boxes, List-Boxes, etc.) and in VB6 menus. Unicode and non-Unicode controlsMore information You can find more information on this subject in Micheal Kaplan's book, "Internationalization with Visual Basic". The chapter entitled "VB-Is it ANSI or Unicode" is available online. All VB6 interfaces are based on the Component Object Model (COM) which only supports Unicode strings. This means that any string passed to a control is necessarily a Unicode string. However, this does not mean that a control must use Unicode internally. Internally, the VB6 Built-In controls and VB6 menus do not use UnicodeMost commercially available components and in fact most components from Microsoft (such as the Windows common controls) use Unicode internally, and therefore do not cause any problems.However, the VB6 built-in controls and the VB6 menu system work internally with ANSI (or strictly speaking Multibyte) encoding, and this is the whole cause of the problem. Multibyte characters and CodepagesUsing ANSI or Multibyte character encoding does not mean, that controls and menus cannot display other character sets. The VB6 built-in controls and menus can, for example, display Chinese characters, but only using the correct Chinese codepage.(You can find more information about codepages in Michael Kaplan's book.) This means, that your end users might not even have this problem! For example, if your development system uses an English version of Windows, then you may have a problem showing Chinese characters, because you are using the wrong codepage. However, a Chinese user will most likely have a Chinese version of Windows, which will use the correct codepage and therefore display Chinese characters correctly. Fixing the problem for the UserUniToolBox Based on the product description, the UniToolbox provides replacement for the VB6 built-in controls and the menu system designed to solve exactly this problem. I have not tested this product. If this is not good enough, then it is a serious problem. You will probably have to avoid using the VB6 built-in controls entirely and use owner drawn menus. Again I would refer you to Michael Kaplan's book for more information. However, from today's standpoint, moving to VB.NET may well be a better option. Fixing the problem for the DeveloperAssuming you can live with this problem, you will nevertheless want to see the characters properly on your development system.The good news is, that if you are using Windows 2000 or Windows XP, then this is possible. Under Windows 2000 and Windows XP, it is possible to change the codepage used for non-Unicode applications. The rest of this article describes how to do this. AppLocale for Windows XPUnder Windows XP, there is an alternative solution, which is a utility called AppLocale.This utility allows you to change the codepage for a single non-Unicode application, without affecting all applications in the system. You can find more information on AppLocale and download the utility from the Microsoft Global Development web site. Changing the Language for non-Unicode programs under Windows XPSee also Changing Language for non-Unicode Programs on the Microsoft Global Development web site. The exact appearance on your system may differ from the screenshots shown below (since I do not use the default XP window style).
![]()
![]()
![]()
![]()
Note: If you have not already installed the fonts for this language on your system, you will need to have your original Windows XP CD, so that Windows can copy these fonts now. Changing the Language for non-Unicode programs under Windows 2000See also Changing Language for non-Unicode Programs on the Microsoft Global Development web site.
![]()
![]()
![]()
Note: If you have not already installed the fonts for this language on your system, you will need to have your original Windows XP CD, so that Windows can copy these fonts now. The End ResultThe following screen shots show a VB6 application localized into Chinese (using the Multi-Language Add-In for VB6). As you can see, Chinese characters appear correctly in the menus.![]()
|







