Link to home
Start Free TrialLog in
Avatar of nylluis
nylluis

asked on

Internationalization, IME's, and Delphi

 I need to write a code which may be localized to various Asian locales, and am having trouble getting any component to accept a character glyph entered via a standard Windows IME (I'm using Windows 2000 Pro).

  When I use a component such as TEdit, my entry is translated into a question-mark. I suspect that the reason for this is that TEdit is derived from TCustomEdit, and so the Text field is of type TCaption, which is defined as a String in VCL (as opposed to CLX, where TCaption is defined as a WideString).

  My primary goal would be to know how to get a Chinese character (entered via the Windows Chinese IME) to appear in an edit box, and to have access to that character from a WideString within the code (without it being converted into a '?').

  A secondary goal would be to know how I could manually enter the hex or decimal representation of a Unicode character into the first element of a given WideString. For instance, given the variable A to be a WideString, how could I assign a Chinese character to A[1]?

Thanks,
  Luis
ASKER CERTIFIED SOLUTION
Avatar of realzal
realzal

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of TOndrej
TOndrej

You're right about TEdit.
You need a Unicode edit control and use a Unicode font.
Re decimal representation: A[1] := #1602;