>My guess, why a simple Pos does not work for Panagiotis, 
>is a either a FPC bug 

FPC is 2.0.2 downloaded a few days ago from a German ftp server directed
through www.freepascal.org.

>or a gtk1 bug with greek characters.

I'm compiling for GTK2.

Panagiotis


-----Original Message-----
From: Mattias Gaertner [mailto:[EMAIL PROTECTED] 
Sent: Monday, February 27, 2006 10:46 PM
To: [email protected]
Subject: Re: [lazarus] String functions on non latin text


On Mon, 27 Feb 2006 13:41:13 -0600 (CST)
Jesus Reyes <[EMAIL PROTECTED]> wrote:

> 
>  --- Panagiotis Sidiropoulos <[EMAIL PROTECTED]> escribió:
> 
> > Please download sample project at:
> > - www.magentadb.gr/ftp/pos-sample.zip
> > 
> > Panagiotis
> > 
> 
> result := Pos(UTF8Decode(SubStr), UTF8Decode(Str));
> 
> seems to work, I think Pos(UTF8String,UTF8String) is yet to be 
> implemented.

It does not need to be implemented. One nice feature of UTF8 is, that
you can find out the start of an UTF8 character without parsing the
whole string. A simple substring search works with UTF8 and is
unambiguous. On the other hand: UTF8Decode will fail on some character
sets, not fitting into 2byte characters.

My guess, why a simple Pos does not work for Panagiotis, is a either a
FPC bug or a gtk1 bug with greek characters.


Mattias

_________________________________________________________________
     To unsubscribe: mail [EMAIL PROTECTED] with
                "unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives

_________________________________________________________________
     To unsubscribe: mail [EMAIL PROTECTED] with
                "unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to