In Dec. of 2007 I posted here about my attempts to convert my translator program to Lazarus/FPC. I had some luck then, under Windows XP and Ubuntu Linux. But I ended up abandoning the effort for lack of a reasonable way to replace TRichEdit. I think at the time SynEdit didn't support Unicode as it does not, via UTF8.
It's been quite a while, so I thought I would give it another try.
I use Unicode extensively in my Delphi program. I use TNTware components in Delphi 7 and recently started using Delphi 2009.
However, I still want to build a Lazarus/FPC version for use on Linux and possibly MAC OSX. I'm considering making my program open source at some point, but not quite sure I want to do it now.
I use a Pascal unit called Unicode.pas written by Mike Lischke (from Germany). I think it's the same one used in the TNTware, and it includes support for TWideStringList, which I use in my program.
But I also need the capability to classify characters, based on ranges, as to what "codepage" they fall into, Cyrillic, Hangul, Greek, Hebrew, Arabic, Japanese, Chinese, etc.
And I need the routines which support upper and lower case tests and conversions, ispper, islower, toupper, tolower, ispunctuation, isdigit, isalpha, isalphanum, etc.
Delphi 2009 has many of these routines in their new Character unit.
Unfortunately, I have to be able to function without all the new stuff in Delphi 2009, so I would like to get Mike Lischke's unit to compile under Lazarus/FPC.
I have succeeded at that, but still can't get it to work, due to some sort of problem with the included Unicode.res file. This is a 68 KB binary resource file containing information about all the Unicode characters.
I don't know how to adapt this resource file, or if it's even worth the trouble. But I figured I'd ask on this forum and see if anyone else has tried to convert this Unicode.pas and succeeded.
There exist also many other versions of this unit, include JclUnicode.pas and SynUnicode.pas. I tried compiling the Jedi Code Library version, but ran into some problems and finally gave up.
Has anyone else succeeded at getting the JCL to compile and work on Lazarus/FPC? I know it's been talked about for years, but I have yet to find any definitive info about it.
I'd love to use the JCL in my program, especially some of the Unicode functions and date/time routines, but if I can't get it to compile, then it's not very useful.
I have made a lot of progress, and I could make my program independent of this unit Unicode.pas, but I particularly wanted to use the TWideStringList, for storing lists of Unicode strings, for things like spell checking and translation dictionaries. If I have to live without TWideStringList, I can still make my program work, but it is a great convenience.
If anyone has any comments or suggestions, don't be shy. I can use all the help I can get. I have been working on my program as long as anyone can remember, and it's still not "finished" yet, nor will it ever be until it can run on all the major platforms.
In the past few months I've tried porting my program to C++/CLI for .NET under Microsoft Visual C++ 2008 Express Edition. I also tried NetBeans/Java, and Eclipse, without much success. I do have most of the code running in C++/CLI, but lost interest in it, in favor of trying out Delphi 2009, which turns out to have all the required functionality.
I want my program to be easily portable between at least Windows, Linux, and Mac OSX, and Lazarus/FPC is one possible solution, maybe not the best one.
I'm using SynEdit right now, but might end up using something else for my editor windows. I allow the user to input text in one editor and produce translated results in another editor window. I have other hidden windows internally, which can be selectively displayed.