How to get full Unicode support, including Chinese characters in VCL or Windows Common Controls controls on XP, like in Win7

I have an application that I tested to support internationalization.

There is, for example, a standard TEdit control with the font .Name = 'Arial'.

On Windows 7, it seems to automatically capture glyphs for CJK characters, from Arial Unicode MS or elsewhere, for common EDIT elements if the font assigned to this control does not contain a specific international character.

In Windows XP, it seems that Chinese characters are displayed as boxes, even when the MS Arial Unicode font is installed, unless I change the font name in delphi form to Arial Unicode MS.

Is this something that everyone is facing international font support in Windows XP? Do common Windows controls do things differently? The behavior that I see in Windows 7 is certainly friendlier than the behavior that I see in Windows XP.

This difference in behavior is not limited to regular Windows controls. It seems even Internet Explorer and the MS Explorer shell have problems running tests, such as the image here: enter image description here

  • What are people doing about this?

  • What is the expected behavior of the platform in Windows XP? Do you need to find which language the user wants to use and find a font to use them that supports this language? I think Arial Unicode MS can be a good default, as it has almost every Unicode language that is.

. , Microsoft " " , " " Windows.

+3
1

Vista Windows 7 . Windows XP, , , .

, IsValidLanguageGroup LGRIP_INSTALLED:

uses
  Windows;

type
  LGRPID = DWORD;

const
  LGRPID_INSTALLED = $00000001;  // installed language group ids
  LGRPID_SUPPORTED = $00000002;  // supported language group ids

  LGRPID_WESTERN_EUROPE       = $0001; // Western Europe & U.S.
  LGRPID_CENTRAL_EUROPE       = $0002; // Central Europe
  LGRPID_BALTIC               = $0003; // Baltic
  LGRPID_GREEK                = $0004; // Greek
  LGRPID_CYRILLIC             = $0005; // Cyrillic
  LGRPID_TURKISH              = $0006; // Turkish
  LGRPID_JAPANESE             = $0007; // Japanese
  LGRPID_KOREAN               = $0008; // Korean
  LGRPID_TRADITIONAL_CHINESE  = $0009; // Traditional Chinese
  LGRPID_SIMPLIFIED_CHINESE   = $000a; // Simplified Chinese
  LGRPID_THAI                 = $000b; // Thai
  LGRPID_HEBREW               = $000c; // Hebrew
  LGRPID_ARABIC               = $000d; // Arabic
  LGRPID_VIETNAMESE           = $000e; // Vietnamese
  LGRPID_INDIC                = $000f; // Indic
  LGRPID_GEORGIAN             = $0010; // Georgian
  LGRPID_ARMENIAN             = $0011; // Armenian

function IsValidLanguageGroup(LanguageGroup: LGRPID; dwFlags: DWORD): BOOL; stdcall;
  external kernel32;

function IsCJKInstalled: Boolean;
begin    
  Result := IsValidLanguageGroup(LGRPID_SIMPLIFIED_CHINESE, LGRPID_INSTALLED);
end;
+6

All Articles