Re: [fpc-pascal] cocoa usage

2009-07-25 Thread dmitry boyarintsev
Installing the cocoa package, should do the search path for you. so you don't need to modify fpc.cfg or add compiler options to a lazarus project If you don't use cocoa the package, then you need to add units search paths manually. In any way you find it easier (modifying fpc.cfg or lazarus projec

Re: [fpc-pascal] cocoa usage

2009-07-25 Thread dmitry boyarintsev
> I am trying to get into cocoa... > using lazarus from svn TRUNK I get some files in lcl/units/i386-darwin/cocoa remove these compiled units files. > can someone clarify what to use? Shell I copy the lazarus-cc stuff into the > lcl stuff above? you don't need to copy from ccr to lcl. upload coc

Re[2]: [fpc-pascal] Case insensitive comparison of strings with non-ascii characters

2009-07-25 Thread JoshyFun
Hello FPC-Pascal, Thursday, July 23, 2009, 2:02:38 PM, you wrote: LAPC> Hi, i'm aware that the performance is bad although had not tested like LAPC> you did, but at this point i'd like to stick with a solution that fpc LAPC> provides natively since it's being used in a fpc component LAPC> (TSqli

Re[2]: [fpc-pascal] Case insensitive comparison of strings with non-ascii characters

2009-07-25 Thread JoshyFun
Hello FPC-Pascal, Saturday, July 25, 2009, 5:46:39 PM, you wrote: t> @Luiz Americo t> Your code t> WideCompareText(UTF8Decode(Key), UTF8Decode(Str)) t> will work, but if speed matters, then it's rather bad. That's not right, the assumption that: lowercasemapping(a)=lowercasemapping(b) is the

Re: [fpc-pascal] Case insensitive comparison of strings with non-ascii characters

2009-07-25 Thread Jonas Maebe
On 25 Jul 2009, at 19:03, theo wrote: Do turkish systems behave differently for WideLowerCase('I')? Will they return $0131 instead of $0069 ? They should, since the uppercase version of i is İ there (i.e., a capital I with a dot on top). See e.g. http://www.i18nguy.com/unicode/turkish-i18n.

Re: [fpc-pascal] Case insensitive comparison of strings with non-ascii characters

2009-07-25 Thread theo
>> if SLen1 <> SLen2 then //Assuming lower/uppercase representations >> have the same byte length > > That is a wrong assumption. E.g., the lowercase version of I > (uppercase i, a single byte) in Turkish is ı (an "i" without a dot, > definitely not a single-byte character). OK thanks. That's w

Re: [fpc-pascal] Case insensitive comparison of strings with non-ascii characters

2009-07-25 Thread Luiz Americo Pereira Camara
theo escreveu: @Luiz Americo Your code WideCompareText(UTF8Decode(Key), UTF8Decode(Str)) will work, but if speed matters, then it's rather bad. Hi, i'm aware that the performance is bad although had not tested like you did, but at this point i'd like to stick with a solution that fpc prov

Re: [fpc-pascal] Case insensitive comparison of strings with non-ascii characters

2009-07-25 Thread Jonas Maebe
On 25 Jul 2009, at 17:46, theo wrote: if SLen1 <> SLen2 then //Assuming lower/uppercase representations have the same byte length That is a wrong assumption. E.g., the lowercase version of I (uppercase i, a single byte) in Turkish is ı (an "i" without a dot, definitely not a single-byte

Re: [fpc-pascal] Case insensitive comparison of strings with non-ascii characters

2009-07-25 Thread theo
@Luiz Americo Your code WideCompareText(UTF8Decode(Key), UTF8Decode(Str)) will work, but if speed matters, then it's rather bad. I've tried to make a faster function for UTF-8: uses unicodeinfo, LCLProc; function UTF8CompareText(s1, s2: UTF8String): Integer; var u1, u2: Ucs4Char; u1l, u2l: lo