I'm a newbie at this forum. I've been using Delphi 3.0 for a long time, but have run into some problems I just don't know how to handle.
I'm looking for some coding tips on how to do certain things in Delphi ObjectPascal.
First of all, is Delphi 3.0 hopelessly obsolete? I've been using it at least since 1998 and it seems to work as well on XP as it did on Windows 98 and later 2000.
I am working with foreign language text, building a translation tool, and I have to input text in various languages and the special characters don't always get handled properly.
In particular, certain Unicode characters can be pasted from another site into my program, but when I save them in a Rich Text File (using a Rich Text Editor control gizmo), some of these Unicode characters don't get stored properly or at all. They may look fine on the screen when first pasted, but get converted to a ? internally, so that my program never sees those characters. An example would be the letter e with a single dot over it, as opposed to e with an accent (acute or grave, é, è, ) or an umlaut (ü). I don't even know how to enter such a Unicode character using the U.S. International Keyboard in windows, although I'm sure where there's a will there's a way. So far I've mostly had to deal with characters generated by other people and I cut and paste the text to process through my program.
I'd really love to be able to save Unicode in a file and read it into my Delphi program automatically using the Load From File routine (I forget the exact name). I'm just not sure if the 16-bit Unicode characters can be stored in the Lines array within the Rich Text Editor control in Delphi.
I've been using these routines for many years, since 1998, in fact, since I coded the first Windows version of my existing DOS program, using Delphi 3.0. I also had Delphi 1.0 and 2.0 in the past. Does anyone have any recommendations on upgrading? I saw a free version online that I was afraid to install for fear of messing up my existing installation, which works quite well for me.
Ok, that's one question, is there an easy way to handle these Unicode characters on input and output.
I also would love to know how to highlight specific portions of the text within a Rich Text Editor control, without changing the attributes of all the lines, just some lines or some words within the line. I'd like to highlight unrecognized words in a different color to make them stand out. Any ideas on how to do this easily. I've had very little luck reading the Delphi Help files. It seems like nothing I look for is in the Index, and the help files might as well have been written by aliens from another planet, as they aren't as straightforward and prescriptive as I might like.
I've had good luck winging it on my own thus far, but it's time to ask for help, as I just haven't had any luck solving certain problems with the user interface. I've been coding in Pascal since around 1980, so I know Pascal very well, just am not as familiar with character set issues as I would like to be. Ideally I could handle Cyrillic just as easily as Japanese, or any European language which uses special characters, such as Esperanto, Latvian, Lithuanian, just to name a few that present special challenges. It seems like the RTF format will handle a lot of special characters, but notepad and other editors complain if I try to save a file with even a single Unicode character in it, and I don't know how to modify my program to store all my files in Unicode format.
Any help, ideas, suggestions, code snippets, examples, links, etc, would be greatly appreciated.