[fpc-devel] Qt, Java and Unicode support

Graeme Geldenhuys graemeg.lists at gmail.com
Tue Dec 2 13:48:15 CET 2008


On Tue, Dec 2, 2008 at 2:31 PM, Marco van de Voort <marcov at stack.nl> wrote:
>> Why reinvent the wheel with all these different string types and
>> round-about discussions etc...  Can we learn something from other
>> multi-platform frameworks that solved these problems ages ago!
>
> Who said they did?

Well, who said they didn't?  Like I mentioned in my previous message,
I google'd around and couldn't find any complaints. Compare that to
the messages flying around in this mailing list!  Plus here it seems
like everybody has there own idea and can't agree on a single design.

> Who says their solution is more optimal than ours?

Well knowing Trolltech and Qt, everything is optimal! Going with
Trolltech's pass, they seem write very optimal code from graphics to
base framework classes.

As for Java. They would might be slow, but the language seems pretty
good. Plus have have a 10-15 years head start (however long Java has
been available) to Free Pascal in the Unicode department. So it will
be damn stupid if we don't look at what they have done and
accomplished in that time.


> If we can't think of anything better then them, why are you using FPC
> instead of Java?

Because my boss employed me for my Object Pascal skills!  ;-)  I'm
just saying that both those frameworks have solved what Free Pascal is
trying to do now. Plus they solved it years ago, so any issue would
have been detected and resolved long ago.  Not using there experiences
to help us implement Unicode support would be dumb.

I quickly put together the following test program. Compiled it and ran
it on Linux and Windows. The results where the same and worked
perfectly. That's just one example of UpperCase usage already solved.


---------[ StringDemo.java ]---------------
public class StringDemo {
    public static void main(String[] args) {
        String s;
        String n;

        s = "abc";
        n = s.toUpperCase();
        System.out.println(s + " --> " + n);

        s = "Fahrvergnügen";
        n = s.toUpperCase();
        System.out.println(s + " --> " + n);

        s = "ਊ";
        n = s.toUpperCase();
        System.out.println(s + " --> " + n);

        s = "ḛ";
        n = s.toUpperCase();
        System.out.println(s + " --> " + n);
    }
}
------------------------


-------------[ output ]---------------
graemeg at graeme:java$ java StringDemo
abc --> ABC
Fahrvergnügen --> FAHRVERGNÜGEN
ਊ --> ਊ
ḛ --> Ḛ
---------------------------------


Regards,
  - Graeme -


_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/


More information about the fpc-devel mailing list