Re: [fpc-pascal] UTF-8 versions of Copy() and Length()

2007-05-19 Thread Graeme Geldenhuys
On 5/19/07, ik <[EMAIL PROTECTED]> wrote: The reason I started writing my own library is because I wanted pure Pascal libraries to use things. I dislike bindings to other libraries written in different languages (such as QT). "I have a dream" to see native tools for all common needs written in pu

Re: [fpc-pascal] UTF-8 versions of Copy() and Length()

2007-05-19 Thread ik
On 5/19/07, Graeme Geldenhuys <[EMAIL PROTECTED]> wrote: On 5/19/07, Mattias Gaertner <[EMAIL PROTECTED]> wrote: > > Only simple helper functions are in LCLProc. > A lower/uppercase Unicode function is not simple and when eventually > the LCL needs it, it would simply delegate the implementation

Re: [fpc-pascal] UTF-8 versions of Copy() and Length()

2007-05-19 Thread Graeme Geldenhuys
On 5/19/07, Mattias Gaertner <[EMAIL PROTECTED]> wrote: Only simple helper functions are in LCLProc. A lower/uppercase Unicode function is not simple and when eventually the LCL needs it, it would simply delegate the implementation to the LCL interfaces, which can simply call the appropriate lib

Re: [fpc-pascal] UTF-8 versions of Copy() and Length()

2007-05-19 Thread Graeme Geldenhuys
On 5/19/07, Felipe Monteiro de Carvalho <[EMAIL PROTECTED]> wrote: Yes, but if the unicode functions are all in a separate unit, they won´t be included in your executable, unless you really want it. Yup, I agree on this one... -- Graeme Geldenhuys General error, hit any user to continue. ___

Re: [fpc-pascal] UTF-8 versions of Copy() and Length()

2007-05-19 Thread Florian Klaempfl
All these unicode functions should code through the widestring mananger so they get plugable. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] UTF-8 versions of Copy() and Length()

2007-05-19 Thread Mattias Gaertner
On Sat, 19 May 2007 18:07:44 +0200 "Felipe Monteiro de Carvalho" <[EMAIL PROTECTED]> wrote: > On 5/19/07, Florian Klaempfl <[EMAIL PROTECTED]> wrote: > > It's not that easy, for example upper/lower casing, comparing etc. > > of unicode requires usually external big tables which we don't want > > t

Re: [fpc-pascal] UTF-8 versions of Copy() and Length()

2007-05-19 Thread Felipe Monteiro de Carvalho
On 5/19/07, Florian Klaempfl <[EMAIL PROTECTED]> wrote: It's not that easy, for example upper/lower casing, comparing etc. of unicode requires usually external big tables which we don't want to pull into fpc. Yes, but if the unicode functions are all in a separate unit, they won´t be included i

Re: [fpc-pascal] UTF-8 versions of Copy() and Length()

2007-05-19 Thread Rimgaudas Laucius
- Original Message - From: "Florian Klaempfl" <[EMAIL PROTECTED]> To: "FPC-Pascal users discussions" Sent: Saturday, May 19, 2007 4:45 PM Subject: Re: [fpc-pascal] UTF-8 versions of Copy() and Length() Graeme Geldenhuys schrieb: On 5/19/07, Daniël

Re: [fpc-pascal] UTF-8 versions of Copy() and Length()

2007-05-19 Thread Florian Klaempfl
Graeme Geldenhuys schrieb: > On 5/19/07, Daniël Mantione <[EMAIL PROTECTED]> wrote: >> > Does FPC have UTF-8 versions of the Copy() and Length() functions? >> >> They don't exist. FPC has been designed to either use the system encoding >> (which can be utf8). In this case, the string routines from

Re: [fpc-pascal] UTF-8 versions of Copy() and Length()

2007-05-19 Thread ik
Hi, Here is what I made so far, http://ik.homelinux.org/projects/files/ikunicode.tar.gz You can take anything you wish. Please note that when I'll have time, I'll continue working on the unit itself. I also wanted it to be included on the rtl of FPC, but I don't see it happens anytime soon... :(

Re: [fpc-pascal] UTF-8 versions of Copy() and Length()

2007-05-19 Thread Daniël Mantione
Op Sat, 19 May 2007, schreef Felipe Monteiro de Carvalho: > On 5/19/07, Rimgaudas Laucius <[EMAIL PROTECTED]> wrote: > > It is not useful to have functions for both encodings, because these > > encodings are interconvertable and it is more effective to use UTF-16 for > > data processing > > I d

Re: [fpc-pascal] UTF-8 versions of Copy() and Length()

2007-05-19 Thread Graeme Geldenhuys
I just grabbed what I needed from the LCLProc unit (part of Lazarus) which has a lot of UTF-8 and UTF-16 functions. I'll put all those functions in a single unit and post it to fpc-devel mailing list for review before we include it into FPC. If you have any more functions, please pass them on, s

Re: [fpc-pascal] UTF-8 versions of Copy() and Length()

2007-05-19 Thread Rimgaudas Laucius
Message - From: "Felipe Monteiro de Carvalho" <[EMAIL PROTECTED]> To: "FPC-Pascal users discussions" Sent: Saturday, May 19, 2007 1:36 PM Subject: Re: [fpc-pascal] UTF-8 versions of Copy() and Length() On 5/19/07, Rimgaudas Laucius <[EMAIL PROTECTED]> w

Re: [fpc-pascal] UTF-8 versions of Copy() and Length()

2007-05-19 Thread Felipe Monteiro de Carvalho
On 5/19/07, Rimgaudas Laucius <[EMAIL PROTECTED]> wrote: Performance: Length (UTF8) = UTF8->UTF16 2*Lenth(UTF8)> UTF8->UTF16 I don't understand what you are trying to say here. -- Felipe Monteiro de Carvalho ___ fpc-pascal maillist - fpc-pascal@lis

Re: [fpc-pascal] UTF-8 versions of Copy() and Length()

2007-05-19 Thread Rimgaudas Laucius
know any program that implements that). - Original Message - From: "Felipe Monteiro de Carvalho" <[EMAIL PROTECTED]> To: "FPC-Pascal users discussions" Sent: Saturday, May 19, 2007 12:57 PM Subject: Re: [fpc-pascal] UTF-8 versions of Copy() and Length() On

Re: [fpc-pascal] UTF-8 versions of Copy() and Length()

2007-05-19 Thread ik
Hi, I've started to create a unit for UTF-8, but lack of time is keeping me from developing it at the moment. I have some implementation already if you are interested, and wish to continue to develop it. Ido On 5/19/07, Graeme Geldenhuys <[EMAIL PROTECTED]> wrote: Hi, Does FPC have UTF-8 vers

Re: [fpc-pascal] UTF-8 versions of Copy() and Length()

2007-05-19 Thread Felipe Monteiro de Carvalho
On 5/19/07, Rimgaudas Laucius <[EMAIL PROTECTED]> wrote: It is not useful to have functions for both encodings, because these encodings are interconvertable and it is more effective to use UTF-16 for data processing I disagree. The conversion impacts performance heavely. It will also require me

Re: [fpc-pascal] UTF-8 versions of Copy() and Length()

2007-05-19 Thread Rimgaudas Laucius
- Original Message - From: "Graeme Geldenhuys" <[EMAIL PROTECTED]> To: "FPC-Pascal users discussions" Sent: Saturday, May 19, 2007 11:58 AM Subject: Re: [fpc-pascal] UTF-8 versions of Copy() and Length() On 5/19/07, Daniël Mantione <[EMAIL PROTECTED]&g

Re: [fpc-pascal] UTF-8 versions of Copy() and Length()

2007-05-19 Thread Marco van de Voort
> Op Sat, 19 May 2007, schreef Felipe Monteiro de Carvalho: > > > On 5/19/07, Dani?l Mantione <[EMAIL PROTECTED]> wrote: > > > I think a utf8 unit would be usefull. > > > > Some things need to be choosen: > > > > * which functions from lclproc would be included > > > > * the position of the uni

Re: [fpc-pascal] UTF-8 versions of Copy() and Length()

2007-05-19 Thread Felipe Monteiro de Carvalho
On 5/19/07, Michael Van Canneyt <[EMAIL PROTECTED]> wrote: utf8 seems appropriate, or utf if more than one encoding is supported. I think that having a generic name is better, even if at first we only add utf-8 functions, because when we need more functions for other encodings we would need to

Re: [fpc-pascal] UTF-8 versions of Copy() and Length()

2007-05-19 Thread Daniël Mantione
Op Sat, 19 May 2007, schreef Graeme Geldenhuys: > On 5/19/07, Daniël Mantione <[EMAIL PROTECTED]> wrote: > > > > I think a utf8 unit would be usefull. > > Glad you agree. I searched through the mailing list and found quite a > few people that required such function and implemented their own.

Re: [fpc-pascal] UTF-8 versions of Copy() and Length()

2007-05-19 Thread Michael Van Canneyt
On Sat, 19 May 2007, Felipe Monteiro de Carvalho wrote: > On 5/19/07, Daniël Mantione <[EMAIL PROTECTED]> wrote: > > I think a utf8 unit would be usefull. > > Some things need to be choosen: > > * which functions from lclproc would be included > > * the position of the unit on fpc (maybe fcl?

Re: [fpc-pascal] UTF-8 versions of Copy() and Length()

2007-05-19 Thread Daniël Mantione
Op Sat, 19 May 2007, schreef Felipe Monteiro de Carvalho: > On 5/19/07, Daniël Mantione <[EMAIL PROTECTED]> wrote: > > I think a utf8 unit would be usefull. > > Some things need to be choosen: > > * which functions from lclproc would be included > > * the position of the unit on fpc (maybe fc

Re: [fpc-pascal] UTF-8 versions of Copy() and Length()

2007-05-19 Thread Felipe Monteiro de Carvalho
On 5/19/07, Daniël Mantione <[EMAIL PROTECTED]> wrote: I think a utf8 unit would be usefull. Some things need to be choosen: * which functions from lclproc would be included * the position of the unit on fpc (maybe fcl? but then, which directory from fcl) * the exact name of the unit thanks

Re: [fpc-pascal] UTF-8 versions of Copy() and Length()

2007-05-19 Thread Graeme Geldenhuys
On 5/19/07, Daniël Mantione <[EMAIL PROTECTED]> wrote: I think a utf8 unit would be usefull. Glad you agree. I searched through the mailing list and found quite a few people that required such function and implemented their own. So yes, why don't we include a new unit with those functions fo

Re: [fpc-pascal] UTF-8 versions of Copy() and Length()

2007-05-19 Thread Daniël Mantione
Op Sat, 19 May 2007, schreef Graeme Geldenhuys: > On 5/19/07, Daniël Mantione <[EMAIL PROTECTED]> wrote: > > > Does FPC have UTF-8 versions of the Copy() and Length() functions? > > > > They don't exist. FPC has been designed to either use the system encoding > > (which can be utf8). In this ca

Re: [fpc-pascal] UTF-8 versions of Copy() and Length()

2007-05-19 Thread Graeme Geldenhuys
On 5/19/07, Daniël Mantione <[EMAIL PROTECTED]> wrote: > Does FPC have UTF-8 versions of the Copy() and Length() functions? They don't exist. FPC has been designed to either use the system encoding (which can be utf8). In this case, the string routines from sysutils do what you want. The other o

Re: [fpc-pascal] UTF-8 versions of Copy() and Length()

2007-05-19 Thread Daniël Mantione
Op Sat, 19 May 2007, schreef Graeme Geldenhuys: > Does FPC have UTF-8 versions of the Copy() and Length() functions? They don't exist. FPC has been designed to either use the system encoding (which can be utf8). In this case, the string routines from sysutils do what you want. The other optio

[fpc-pascal] UTF-8 versions of Copy() and Length()

2007-05-19 Thread Graeme Geldenhuys
Hi, Does FPC have UTF-8 versions of the Copy() and Length() functions? I've started implementing support for UTF-8 in my fpGUI widget set - more specifically text painting in all components (the easy bit) and text handling in the TFEdit (edit box widget). For now I have used the UTF8Copy() and