Unfortunatelly, even after checking syntax (system.pos()) I get same
strange behaviour, I can't seek in a string.

Panagiotis


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


On Mon, 27 Feb 2006 15:17:41 +0200
Panagiotis Sidiropoulos <[EMAIL PROTECTED]> wrote:

> Functions such as POS() and COPY(), return strange result when used 
> with utf8 text.
> 
> Forr example, if your try
> pos( '__', 
> '_____________________________________________________________________
>
_______________________________________________________________________-
'
> ) you will get 1, which is incorrect.
> 
> I know this has to do with utf encoding (2 or more bytes per 
> character).
> 
> Any ideas?

UTF8 works with System.Pos. Just make sure you use ansistring or
shortstring, not widestring.


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