Re[2]: [fpc-devel] UTF8Encode widestring encoding

2008-08-26 Thread JoshyFun
Hello Sergei, Tuesday, August 26, 2008, 4:16:00 PM, you wrote: SG> Graeme Geldenhuys wrote: >> >> I couldn't find a single program or editor that could display that >> file correctly. Pretty amazing that one file can defeat all programs. >> :-) >> >> Programs I tried: >> Kate (kde editor) >>

Re: [fpc-devel] UTF8Encode widestring encoding

2008-08-26 Thread Graeme Geldenhuys
On 8/26/08, Sergei Gorelkin <[EMAIL PROTECTED]> wrote: > > > I viewed that file with Opera 9.21 and it looked fine for me (all > out-of-range chars replaced by a triangle symbol), although the question how > it *should* look remains open. You are right. :-) Just tried Opera 9.5 (after setting my

Re[2]: [fpc-devel] UTF8Encode widestring encoding

2008-08-26 Thread JoshyFun
Hello Graeme, Tuesday, August 26, 2008, 3:48:39 PM, you wrote: GG> That doesn't say much... :-) It's the usual status :) most ones are focused in speed instead given a bit of security, special against overlong sequences which can bypass security barriers... check the attached file and decode it

Re: [fpc-devel] UTF8Encode widestring encoding

2008-08-26 Thread Sergei Gorelkin
Graeme Geldenhuys wrote: I couldn't find a single program or editor that could display that file correctly. Pretty amazing that one file can defeat all programs. :-) Programs I tried: Kate (kde editor) gEdit (Gnome editor) Firefox 3 (did the best out of the lot) vi (disastrous) OpenO

Re: [fpc-devel] UTF8Encode widestring encoding

2008-08-26 Thread Graeme Geldenhuys
On 8/26/08, JoshyFun <[EMAIL PROTECTED]> wrote: > > http://bugs.freepascal.org/view.php?id=11791 > > The LCL implementation of UTF8ToUTF16 (default one) does not pass the > UTF8 stress test. That doesn't say much... :-) I couldn't find a single program or editor that could display that file co

Re[4]: [fpc-devel] Unicode functions

2008-08-26 Thread JoshyFun
Hello Graeme, Tuesday, August 26, 2008, 1:57:03 PM, you wrote: GG> Apparently sorting is also a bitch! :-) Depending on the country, GG> sorting of special chars like é or ß appear before or after standard GG> alpha (a-z) characters. That's the reason that I'm only thinking currently in the ge

Re: Re[2]: [fpc-devel] Unicode functions

2008-08-26 Thread Graeme Geldenhuys
On 8/26/08, JoshyFun <[EMAIL PROTECTED]> wrote: > > Uppercase and lowercase is quite simple compared with "SameText" ;) Apparently sorting is also a bitch! :-) Depending on the country, sorting of special chars like é or ß appear before or after standard alpha (a-z) characters. Regards, - G

Re: [fpc-devel] UTF8Encode widestring encoding

2008-08-26 Thread JoshyFun
Hello Felipe, Tuesday, August 26, 2008, 12:28:45 PM, you wrote: FMdC> I read the code for UTF8Encode and UTF8Decode routines and they seam FMdC> to suppose that the widestring encoding is UCS-2! Instead of UTF-16 FMdC> Is this the expected behavior or is it only partially implemented? FMdC> Someo

Re[2]: [fpc-devel] Unicode functions

2008-08-26 Thread JoshyFun
Hello Daniël, Tuesday, August 26, 2008, 11:05:58 AM, you wrote: DM> For uppercasing/lowercasing it is correct to define a Unicode char as 2 DM> bytes. If surrogates are handled ;) (my code does not handle them currently). -- Best regards, JoshyFun ___

Re[2]: [fpc-devel] Unicode functions

2008-08-26 Thread JoshyFun
Hello Graeme, Tuesday, August 26, 2008, 9:19:14 AM, you wrote: GG> Or, instead of building the tables ourselves (if they are not GG> available on the Unicode website), could we maybe look at something GG> like the OpenOffice source code and get the tables from there? GG> OpenOffice seems to handl

Re[2]: [fpc-devel] Unicode functions

2008-08-26 Thread JoshyFun
Hello Graeme, Tuesday, August 26, 2008, 8:59:36 AM, you wrote: GG> I'm just curious how this works with Unicode characters. I guess the GG> Unicode website should cover this in detail (though I haven't searched GG> for it yet). How do you convert from lower to upper case? Is there a GG> set form

Re: [fpc-devel] FPC's Delphi mode incompatibility with Delphi compiler

2008-08-26 Thread Michael Van Canneyt
On Tue, 26 Aug 2008, Graeme Geldenhuys wrote: > Hi, > > We are using {$Mode Delphi} in the tiOPF project. Three new functions > were added to one of the base classes. It compiled without issues > under FPC 2.2.3 (and whatever Michael van Canneyt uses). > > I tried to compile that code under D

Re: [fpc-devel] FPC's Delphi mode incompatibility with Delphi compiler

2008-08-26 Thread Marco van de Voort
> > Maybe the Delphi mode in FPC should check for that as well? Delphi mode means that delphi code works. Not that code made in it works on Delphi. (since that would make extensions impossible) ___ fpc-devel maillist - fpc-devel@lists.freepascal.org h

[fpc-devel] FPC's Delphi mode incompatibility with Delphi compiler

2008-08-26 Thread Graeme Geldenhuys
Hi, We are using {$Mode Delphi} in the tiOPF project. Three new functions were added to one of the base classes. It compiled without issues under FPC 2.2.3 (and whatever Michael van Canneyt uses). I tried to compile that code under Delphi 7, after somebody reported the issue under Delphi 2006.

Re: [fpc-devel] UTF8Encode widestring encoding

2008-08-26 Thread Daniël Mantione
Op Tue, 26 Aug 2008, schreef Felipe Monteiro de Carvalho: Hello, I read the code for UTF8Encode and UTF8Decode routines and they seam to suppose that the widestring encoding is UCS-2! Instead of UTF-16 Is this the expected behavior or is it only partially implemented? It is a broken implem

Re: [fpc-devel] Unicode functions

2008-08-26 Thread Daniël Mantione
Op Tue, 26 Aug 2008, schreef ik: Also many languages such as Hebrew Arabic and more does not have upper/lower case thingy (Arabic have for most but not all chars 3 types of appearing one at the beginning of the word/next to a non combined char), one in the middle of the chars (combined on both

Re: [fpc-devel] Unicode functions

2008-08-26 Thread ik
Also many languages such as Hebrew Arabic and more does not have upper/lower case thingy (Arabic have for most but not all chars 3 types of appearing one at the beginning of the word/next to a non combined char), one in the middle of the chars (combined on both sides) and one for the end, if it doe

[fpc-devel] UTF8Encode widestring encoding

2008-08-26 Thread Felipe Monteiro de Carvalho
Hello, I read the code for UTF8Encode and UTF8Decode routines and they seam to suppose that the widestring encoding is UCS-2! Instead of UTF-16 Is this the expected behavior or is it only partially implemented? Someone added UTF8 <-> UTF16 conversion routines in the LCL, so they could be used to

Re: [fpc-devel] Unicode functions

2008-08-26 Thread Graeme Geldenhuys
On 8/26/08, Daniël Mantione <[EMAIL PROTECTED]> wrote: > Klingon does not have capitals, nor does any script outside the BMP. And See the character table (image)... http://www.kli.org/tlh/pIqaD.html q and Q. Klingon doesn't have a lower case D, H, I, P and S either. ;-) But you are kinda cor

Re: [fpc-devel] Unicode functions

2008-08-26 Thread Daniël Mantione
Op Tue, 26 Aug 2008, schreef Graeme Geldenhuys: On 8/26/08, Daniël Mantione <[EMAIL PROTECTED]> wrote: defined as a word (2 bytes), so that means it's only UCS2 compliant and not full Unicode UTF-16 (which is what we want). For uppercasing/lowercasing it is correct to define a Unicode char

Re: [fpc-devel] Unicode functions

2008-08-26 Thread Graeme Geldenhuys
On 8/26/08, Daniël Mantione <[EMAIL PROTECTED]> wrote: > > defined as a word (2 bytes), so that means it's only UCS2 compliant > > and not full Unicode UTF-16 (which is what we want). > > For uppercasing/lowercasing it is correct to define a Unicode char as 2 > bytes. Lets not limit ourselves aga

Re: [fpc-devel] Unicode functions

2008-08-26 Thread Daniël Mantione
Op Tue, 26 Aug 2008, schreef Graeme Geldenhuys: On Tue, Aug 26, 2008 at 9:19 AM, Graeme Geldenhuys <[EMAIL PROTECTED]> wrote: project. Maybe we could use something there - it's written in Object Pascal as well? The LPTK project used a BSD license. I had a quick look at the LPTK project sour

Re: [fpc-devel] Unicode functions

2008-08-26 Thread Graeme Geldenhuys
On Tue, Aug 26, 2008 at 9:19 AM, Graeme Geldenhuys <[EMAIL PROTECTED]> wrote: > project. Maybe we could use something there - it's written in Object > Pascal as well? The LPTK project used a BSD license. I had a quick look at the LPTK project source... So I gather this implementations is totally

Re: [fpc-devel] Unicode functions

2008-08-26 Thread Graeme Geldenhuys
On Tue, Aug 26, 2008 at 9:03 AM, Daniël Mantione <[EMAIL PROTECTED]> wrote: > > There is only one way to case convert Unicode characters: tables. A trivial > solution would be an array[widechar] of widechar, but one might want a more > memory efficient solution. Ah okay - thanks. I saw similar u

Re: [fpc-devel] Unicode functions

2008-08-26 Thread Daniël Mantione
Op Tue, 26 Aug 2008, schreef Graeme Geldenhuys: On Tue, Aug 26, 2008 at 12:15 AM, JoshyFun <[EMAIL PROTECTED]> wrote: returns exactly the same string (WinXP FPC 2.2.2), as this functions seens to not be implemented right now I started to work in some functions for this job at least for the s