Re: [fpc-devel] clocale unit

2008-09-11 Thread Marco van de Voort
In our previous episode, Paul Ishenin said: > Please explain why clocale must be included as a separate unit to the > project? > Why not include it into unix sysutils? It uses the libc library. Same reason as cthreads, cwstring etc. It also allows the user to override basic locale initialization

Re: [fpc-devel] clocale unit

2008-09-11 Thread Marco van de Voort
In our previous episode, Michael Van Canneyt said: > If Graeme Geldenhuys finds the time, he'll code a native > Object Pascal replacement for the clocale unit. That > replacement could go in SysUtils. > (that is, he said he'd give it a try) (IMHO that should be optional too, since contrary to ot

Re: [fpc-devel] clocale unit

2008-09-11 Thread Graeme Geldenhuys
On Thu, Sep 11, 2008 at 8:36 AM, Michael Van Canneyt <[EMAIL PROTECTED]> wrote: > > If Graeme Geldenhuys finds the time, he'll code a native > Object Pascal replacement for the clocale unit. That > replacement could go in SysUtils. > (that is, he said he'd give it a try) And yes, it's still on my

Re: [fpc-devel] Unicodestring branch, please test and help fixing

2008-09-11 Thread Anton Kavalenka
Florian Klaempfl wrote: Graeme Geldenhuys schrieb: Remember, Unicode support is much more that simply storing and displaying text. You have various encodings, RTL or LTR direction etc. I can't see how a simple type can keep track of all such information - but then, I don't know the internals

Re: [fpc-devel] Unicodestring branch, please test and help fixing

2008-09-11 Thread Michael Van Canneyt
On Thu, 11 Sep 2008, Anton Kavalenka wrote: > Florian Klaempfl wrote: > > Graeme Geldenhuys schrieb: > > > > > Remember, Unicode support is much more that simply storing and > > > displaying text. You have various encodings, RTL or LTR direction etc. > > > I can't see how a simple type can ke

Re: [fpc-devel] Unicodestring branch, please test and help fixing

2008-09-11 Thread Paul Ishenin
Anton Kavalenka wrote: How would an OOP approach solve this? The problem isn't the tracking of things like encoding or directions but handling all these information. ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/

Re: [fpc-devel] Unicodestring branch, please test and help fixing

2008-09-11 Thread Martin Friebe
Michael Van Canneyt wrote: On Thu, 11 Sep 2008, Anton Kavalenka wrote: Florian Klaempfl wrote: Graeme Geldenhuys schrieb: Remember, Unicode support is much more that simply storing and displaying text. You have various encodings, RTL or LTR direction etc. I can't see how a simpl

Re: [fpc-devel] patch for ReadInteger in sysformt.inc

2008-09-11 Thread Florian Klaempfl
Markus Beth schrieb: > Hi, > > latest profiling of one of our FPC applications showed ReadInteger (in > rtl/objpas/sysutils/sysformt.inc) to be a performance bottleneck. Using > Pos(Fmt[chpos],'1234567890')<>0 to check if Fmt[chpos] is a digit is > somewhat time consuming. I replaced it with two c

Re: [fpc-devel] FPC 2.2.2 on Linux/SPARC

2008-09-11 Thread Mark Morgan Lloyd
Mark Morgan Lloyd wrote: Jonas Maebe wrote: It's been merged to 2.2.3 now. You can either download the source zipfile from ftp://ftp.freepascal.org/pub/fpc/snapshot/v22/source/fpc.zip, or get it from svn as described here: http://www.freepascal.org/develop.var#svn (make sure you use the ch

[fpc-devel] Overloaded Pos bug

2008-09-11 Thread petr . kristan
In fpc revision 11746 i cannot compile this construction: program posx; var s, s1: WideString; begin Pos(s[1], s1); end. fpc -vh posx.pas Hint: Start of reading config file /etc/fpc.cfg Hint: End of reading config file /etc/fpc.cfg Free Pascal Compiler version 2.3.1 [2008/09/11] for i386 Copy

Re: [fpc-devel] Unicodestring branch, please test and help fixing

2008-09-11 Thread ABorka
Some conversion problem occurs and empty string put into a TListbox if I try to get a field value with some special characters from a SQL result. (using Zeos) The database field can contain any string with '®' in it for this to happen for example: 'sometext®' It seems that ListBox1.Items.Ad

Re[2]: [fpc-devel] Unicodestring branch, please test and help fixing

2008-09-11 Thread JoshyFun
Hello ABorka, Thursday, September 11, 2008, 7:26:50 PM, you wrote: A> The database field can contain any string with '®' in it for this to happen A> for example: 'sometext®' A> It seems that A> ListBox1.Items.Add(SQL1.FieldByName('MyTableField').AsString); [...] A> will only put an empty string i

Re: [fpc-devel] FPC 2.2.2 on Linux/SPARC

2008-09-11 Thread Jonas Maebe
On 11 Sep 2008, at 15:02, Mark Morgan Lloyd wrote: Mark Morgan Lloyd wrote: Jonas Maebe wrote: It's been merged to 2.2.3 now. You can either download the source zipfile from ftp://ftp.freepascal.org/pub/fpc/snapshot/v22/source/fpc.zip , or get it from svn as described here: http://www.fre

[fpc-devel] How hard is it to port FPC to AIX

2008-09-11 Thread Peter Popov
Hi everyone I recently got access to an IBM supercomputer (hundreds of PowerPC) running AIX. Naturally, the powerpc linux version of the compiler does not work. To begin with, AIX uses XCOFF binaries. So my question is: How hard is it to port the powerpc version of fpc to AIX or at least gen

Re: [fpc-devel] How hard is it to port FPC to AIX

2008-09-11 Thread Peter Popov
Could you give me some pointers how to begin? Peter It should not be that hard. There are two main ABI's for PowerPC: the sysv and the aix ABI. Linux/*BSD use the sysv ABI, and Mac OS, Mac OS X and AIX uses the aix ABI. Hence, the aix abi is already supported in the compiler. A libc-based

Re: [fpc-devel] Unicodestring branch, please test and help fixing

2008-09-11 Thread Martin Schreiber
On Saturday 30 August 2008 13.37:42 Florian Klaempfl wrote: > I've continued to work on support of an unicodestring type in fpc. It's > currently in an svn branch at: > http://svn.freepascal.org/svn/fpc/branches/unicodestring > and will be merged later to trunk. The unicodestring type is a ref. > c

Re: [fpc-devel] How hard is it to port FPC to AIX

2008-09-11 Thread Felipe Monteiro de Carvalho
I started a document here: http://wiki.lazarus.freepascal.org/Porting_Free_Pascal It's very incomplete, so fell free to extend as you discover how things work. -- Felipe Monteiro de Carvalho ___ fpc-devel maillist - fpc-devel@lists.freepascal.org ht

Re: [fpc-devel] Unicodestring branch, please test and help fixing

2008-09-11 Thread listmember
>> procedure TLabel.Paint(...) >> begin >> if *Caption.IsRTL *then >> DrawCaptionRTL(0,0,*Caption.AsUTF8*, flags) >> else >> DrawCaption(0,0,*Caption.AsUTF8*, flags); >> end; >> >> Is not that enough? > > What is the gain as opposed to > > procedure TLabel.Paint(...) > begin >if

Re: [fpc-devel] Unicodestring branch, please test and help fixing

2008-09-11 Thread Marco van de Voort
In our previous episode, listmember said: > > else > > DrawCaption(0,0,AsUTF8(Caption), flags); > > end; > > > > In other words where is the benefit from OOP in this ? > > IMO, both are deficient as they both assume that a string block (text) > is either RTL or LTR. The assignment

Re: [fpc-devel] Unicodestring branch, please test and help fixing

2008-09-11 Thread Florian Klaempfl
Marco van de Voort schrieb: In our previous episode, listmember said: > else > DrawCaption(0,0,AsUTF8(Caption), flags); > end; > > In other words where is the benefit from OOP in this ? IMO, both are deficient as they both assume that a string block (text) is either RTL or LTR.

Re: [fpc-devel] Unicodestring branch, please test and help fixing

2008-09-11 Thread Martin Schreiber
On Thursday 11 September 2008 22.33:32 listmember wrote: > >> procedure TLabel.Paint(...) > >> begin > >> if *Caption.IsRTL *then > >> DrawCaptionRTL(0,0,*Caption.AsUTF8*, flags) > >> else > >> DrawCaption(0,0,*Caption.AsUTF8*, flags); > >> end; > >> > >> Is not that enough? > >

Re: [fpc-devel] Unicodestring branch, please test and help fixing

2008-09-11 Thread Florian Klaempfl
Martin Schreiber schrieb: On Saturday 30 August 2008 13.37:42 Florian Klaempfl wrote: I've continued to work on support of an unicodestring type in fpc. It's currently in an svn branch at: http://svn.freepascal.org/svn/fpc/branches/unicodestring and will be merged later to trunk. The unicodestri

Re: [fpc-devel] Unicodestring branch, please test and help fixing

2008-09-11 Thread Mattias Gaertner
On Thu, 11 Sep 2008 22:56:49 +0200 Martin Schreiber <[EMAIL PROTECTED]> wrote: >[...] > > Doesn't that mean we will be --by design-- unable to write something > > like 'Yom Kippur (יוֹם כִּפּוּר)' on a caption? Yes and more. See below. > > This is why I keep asking that the 'TCharacter' or 'TCh

Re: [fpc-devel] Unicodestring branch, please test and help fixing

2008-09-11 Thread listmember
Actually, UTF-8 can contain bidi info, it's indeed a matter of the renderer. And, how do you propose doing a case-insensitive search in a given text that contains multiple languages? ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://

Re: [fpc-devel] Unicodestring branch, please test and help fixing

2008-09-11 Thread Martin Friebe
listmember wrote: Actually, UTF-8 can contain bidi info, it's indeed a matter of the renderer. And, how do you propose doing a case-insensitive search in a given text that contains multiple languages? I assume you speak of multiply collations in on string? IMHO You can't? But you could use a TS

Re: [fpc-devel] Unicodestring branch, please test and help fixing

2008-09-11 Thread listmember
IMHO You can't? But you could use a TStringList. I don't think I could. Because, in TStringList, you have no way of knowing what language each item belogs to. You could, of course, work around it by adding a fake object to each item denoting the language, but that does mean a generalized so

Re: [fpc-devel] Unicodestring branch, please test and help fixing

2008-09-11 Thread Martin Friebe
listmember wrote: I also do not know of other apps that could do this. (And it may not be possible). Look around. Databses for example, AFAIK the most you can do is define a collation per column. True. But, that does not mean that those app/databases are well thought out. Does it? Point of Vie

Re: [fpc-devel] Unicodestring branch, please test and help fixing

2008-09-11 Thread listmember
So maybe the design is quite well thought? Adding a flag field is easy enough --if all you're doing is to do some sort of collation. In that sense, everything is well tought out. But.. Life becomes very complicated when you begin to do things like FTS (full text search) on a multilanguage t

Re: [fpc-devel] Unicodestring branch, please test and help fixing

2008-09-11 Thread ABorka
Hi, Thanks for pointing me to the Lazarus thread about this and the bug report. Checked them. But as I understand there is no solution available at the moment for this. I have a database that is not encoded utf8 (and it will never be because other client programs are accessing it and their u