Re: [fpc-pascal] Funny things about utf-8 strings on mac

2007-06-12 Thread Daniël Mantione
Op Wed, 13 Jun 2007, schreef Felipe Monteiro de Carvalho: > How would I then be sure that my string is never converted (or always > converted from utf-8 to utf-8 if prefered), but just passed like I > wrote it to the library that I am using? Add the cwstring unit, and run it in an utf-8 termina

Re: [fpc-pascal] Funny things about utf-8 strings on mac

2007-06-12 Thread Felipe Monteiro de Carvalho
My current understanding of the issue is this: I don't tell fpc how my file is encoded, so it suposes it's latin iso. Then fpc detects the encoding of the operating system, and it sees that it's also latin iso, so no convertion is necessary. I suppose that if a different operating system encodin

Re: [fpc-pascal] fpcunit documentation?

2007-06-12 Thread Darius Blaszijk
The link you gave below to the pdf seems to point to a valid file. Please recheck it. Darius Tom Verhoeff wrote: I know FreePascal includes the fpcunit unit testing framework (the compiler knows where to find it), but I can't seem to find any documentation via the regular www.freepascal.org,

[fpc-pascal] fpcunit documentation?

2007-06-12 Thread Tom Verhoeff
I know FreePascal includes the fpcunit unit testing framework (the compiler knows where to find it), but I can't seem to find any documentation via the regular www.freepascal.org, or the fpc wiki, or on the lazarus site? Michael's fpcunit.pdf seems hidden. Google tells me it is here

Re: [fpc-pascal] Search order for libraries, how to influence; using GMP

2007-06-12 Thread Daniël Mantione
Op Tue, 12 Jun 2007, schreef Michael Van Canneyt: > > Where do the first three come from? Can those be (re)moved? > > The compiler adds them by default, see systems/t_linux.pas. > You can't remove them except by editing link.res (or changing the compiler). ... and there is no need. The messag

Re: [fpc-pascal] Search order for libraries, how to influence; using GMP

2007-06-12 Thread Darius Blaszijk
BTW: JediMath has a 100% pascal implementation for arbitrary length arithmatic. Checkout JmLargeFloat. Darius Tom Verhoeff wrote: I am trying to use the GNU Multi-Precision (GMP) library with FreePascal under Linux. I have a Pascal interface for GMP (originally for Kylix; translated from C he

Re: [fpc-pascal] Search order for libraries, how to influence; using GMP

2007-06-12 Thread Michael Van Canneyt
On Tue, 12 Jun 2007, Tom Verhoeff wrote: > I am trying to use the GNU Multi-Precision (GMP) library with > FreePascal under Linux. > > I have a Pascal interface for GMP (originally for Kylix; translated > from C header file). > > The header file libgmp.pas and my using program testgmp.pas comp

Re: [fpc-pascal] Search order for libraries, how to influence; using GMP

2007-06-12 Thread Marco van de Voort
> How can I force the linker to look in /usr/lib32 before /usr/lib ? -Xd See http://www.stack.nl/~marcov/buildfaq.pdf section 3.4.1 ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

[fpc-pascal] Search order for libraries, how to influence; using GMP

2007-06-12 Thread Tom Verhoeff
I am trying to use the GNU Multi-Precision (GMP) library with FreePascal under Linux. I have a Pascal interface for GMP (originally for Kylix; translated from C header file). The header file libgmp.pas and my using program testgmp.pas compile fine. But linking fails. The message is /usr/bin/ld

Re: [fpc-pascal] Funny things about utf-8 strings on mac

2007-06-12 Thread Jonas Maebe
On 12 Jun 2007, at 20:40, Florian Klaempfl wrote: There's utf8encode/decode, but it's quite annoying if you have to replace all widestring->ansistring assignments and parameter passing code with that call (especially since the type conversion from widestring to ansistring is supposed to do ever

Re: [fpc-pascal] Funny things about utf-8 strings on mac

2007-06-12 Thread Florian Klaempfl
Jonas Maebe schrieb: > > On 12 Jun 2007, at 11:41, Florian Klaempfl wrote: > >>> Looks somewhat illogical to me ... so I write a UTF-8 string and need >>> a widestring managed? But I am not using widestrings ... >> >> You're. String constants containing chars > 127 are obviously as >> widestrings

Re: [fpc-pascal] Funny things about utf-8 strings on mac

2007-06-12 Thread Jonas Maebe
On 12 Jun 2007, at 11:41, Florian Klaempfl wrote: Looks somewhat illogical to me ... so I write a UTF-8 string and need a widestring managed? But I am not using widestrings ... You're. String constants containing chars > 127 are obviously as widestrings because when you give a code page in th

Re: [fpc-pascal] Re: FindFirst / FindNext with faHidden under Linux

2007-06-12 Thread Marco van de Voort
> Currently I am doing the following test to filter out the following > directories I consider hidden. > > Hidden directories are: . or '.' or '..' (in the following code you access s[1] without checking length first) > repeat > if (s[1] in ['.']) or (s = '..') then > continue

Re: [fpc-pascal] FindFirst / FindNext with faHidden under Linux

2007-06-12 Thread Daniël Mantione
Op Tue, 12 Jun 2007, schreef Graeme Geldenhuys: > Hi, > > I'm doing a FindFirst / FindNext and fitering out all faHidden and > faDirectory results. > I don't want to show and dot (.) directories as they are > considered hidden under Linux. > Yet FindFirst / FindNext doesn't have the faHidden fl

[fpc-pascal] Re: FindFirst / FindNext with faHidden under Linux

2007-06-12 Thread Graeme Geldenhuys
Currently I am doing the following test to filter out the following directories I consider hidden. Hidden directories are: . or '.' or '..' repeat if (s[1] in ['.']) or (s = '..') then continue; [...process non-hidden directories here...] until FindNext(...); Is there a be

[fpc-pascal] FindFirst / FindNext with faHidden under Linux

2007-06-12 Thread Graeme Geldenhuys
Hi, I'm doing a FindFirst / FindNext and fitering out all faHidden and faDirectory results. I don't want to show and dot (.) directories as they are considered hidden under Linux. Yet FindFirst / FindNext doesn't have the faHidden flag set for those directories Is there another function or anoth

Re: [fpc-pascal] Funny things about utf-8 strings on mac

2007-06-12 Thread Florian Klaempfl
Felipe Monteiro de Carvalho schrieb: > Daniel Mantione wrong some coments on my bug report: > > http://www.freepascal.org/mantis/view.php?id=9058 > > Could someone elaborate on this? I did't really understand > > Looks somewhat illogical to me ... so I write a UTF-8 string and need > a widestrin

Re: [fpc-pascal] Funny things about utf-8 strings on mac

2007-06-12 Thread Felipe Monteiro de Carvalho
Daniel Mantione wrong some coments on my bug report: http://www.freepascal.org/mantis/view.php?id=9058 Could someone elaborate on this? I did't really understand Looks somewhat illogical to me ... so I write a UTF-8 string and need a widestring managed? But I am not using widestrings ... And t

Re: [fpc-pascal] Funny things about utf-8 strings on mac

2007-06-12 Thread Florian Klaempfl
Felipe Monteiro de Carvalho schrieb: >> The default code page used by FPC is 8859-1. However, the scanner >> detects the UTF-8 marker if present, and when it finds it then it >> switches the code page to UTF-8. You can also set the code page >> manually to UTF-8 using {$codepage utf-8}. > > Why do

Re: [fpc-pascal] Funny things about utf-8 strings on mac

2007-06-12 Thread Jonas Maebe
On 12 jun 2007, at 10:17, Felipe Monteiro de Carvalho wrote: On 6/12/07, Jonas Maebe <[EMAIL PROTECTED]> wrote: The compiler internally stores such strings as widestrings. I don't know the details of what the scanner does exactly with utf-8 and why it does so, but there's quite a few utf-8 spe

Re: [fpc-pascal] Funny things about utf-8 strings on mac

2007-06-12 Thread Felipe Monteiro de Carvalho
On 6/12/07, Jonas Maebe <[EMAIL PROTECTED]> wrote: The compiler internally stores such strings as widestrings. I don't know the details of what the scanner does exactly with utf-8 and why it does so, but there's quite a few utf-8 specific code in the scanner. Should I submit a bug report? -- F

Re: [fpc-pascal] Funny things about utf-8 strings on mac

2007-06-12 Thread Jonas Maebe
On 12 jun 2007, at 10:00, Felipe Monteiro de Carvalho wrote: The default code page used by FPC is 8859-1. However, the scanner detects the UTF-8 marker if present, and when it finds it then it switches the code page to UTF-8. You can also set the code page manually to UTF-8 using {$codepage utf

Re: [fpc-pascal] Funny things about utf-8 strings on mac

2007-06-12 Thread Felipe Monteiro de Carvalho
On 6/12/07, Jonas Maebe <[EMAIL PROTECTED]> wrote: You said things did initially work with the UTF-8 marker in place. I didn't say they worked. I said that the source code compiled =) What happens is that lazarus can't handle utf-8, so I open TextWrangler, edit the strings, close it, and go ba

Re: [fpc-pascal] Funny things about utf-8 strings on mac

2007-06-12 Thread David Pethes
Felipe Monteiro de Carvalho wrote: Does anyone know what are those funny characters? (I suppose some kind of encoding setting) Your Text editor saved those files with byte order mark (BOM) - see http://en.wikipedia.org/wiki/Byte_Order_Mark. Dunno about the second part of your question though,

Re: [fpc-pascal] Funny things about utf-8 strings on mac

2007-06-12 Thread Jonas Maebe
On 12 jun 2007, at 09:28, Felipe Monteiro de Carvalho wrote: I edited my source code with TextWrangler (a macintosh text editor), setting the encoding to utf-8, and when I opened with Lazarus it would show the beginning of the file like this: Ôªøunit mainform; Notice the first 3 funny charact

[fpc-pascal] Funny things about utf-8 strings on mac

2007-06-12 Thread Felipe Monteiro de Carvalho
Hi, I edited my source code with TextWrangler (a macintosh text editor), setting the encoding to utf-8, and when I opened with Lazarus it would show the beginning of the file like this: Ôªøunit mainform; Notice the first 3 funny characters (actually on lazarus I see different characters, but th