Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

using UNICODE, please help, I'm sure some of you can help 1

Status
Not open for further replies.

sancho1980

Technical User
Nov 25, 2005
15
DE
Hello,
I'm new to Delphi.
I'm trying to write a vocabulary trainer of my own. Do you mind helping me out?
Suppose I have written a vocabulary list in the windows editor and save it as a .txt - file using the UTF8-encoding.

Now, even loading that document into a TMemo text field doesnt work properly for special characters (I tried some czech letters like ? and ž) which are displayed in a very funny way.

What I want to do is use my own TEntry class which is defined as follows:

type
TEntry = class
private
FTarget: WideString;
FSource: WideString;
public
property Source: WideString read FSource write FSource;
property Target: WideString read FTarget write FTarget;
constructor Create (s, t: string);
end;

I want to load all the entries from my vocabulary list file into an instance of TVocabulary list:

type
TVocabularyList = class(TList)
private
public
function LoadFromFile(FileName: String): Boolean;
end;

The elements of this list would then all be TEntry objects. It works fine as long as I use only characters from one set in the list and store it using the normal ANSI encoding but I want this program to work with UNICODE so that I can virtually use it for any language. Any ideas? Please help me!!!m *should* so is read the
 
delphi VCL is not unicode compatible,

so you must avoid using *any* VCL class (so NO TMemo, NO TStringlist)

look here for some controls/components that are unicode compatible :


-----------------------------------------------------
What You See Is What You Get
Never underestimate tha powah of tha google!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top