Summary on Re: [fpc-pascal] Unicode file routines proposal

Michael Van Canneyt michael at freepascal.org
Tue Jul 1 16:26:02 CEST 2008



On Tue, 1 Jul 2008, Marco van de Voort wrote:

> > On Tue, 1 Jul 2008, Jeff Wormsley wrote:
> > > is defined as char, it gets converted to a standard 0-255 value, but c could
> > > be defined as FlorianChar and be the native char size.  Or am I smoking crack?
> > 
> > No, you understand it correct.
> > 
> > Obviously, with Florian's type, simple low-level access is out of the question.
> > That's the price you pay.
> 
> Huh, since when is [] lowlevel access? It is a normal string operation. And
> Tiburon will keep supporting it.

You can still do C:=S[i]. What you cannot do is

  P:=PChar(S);
  While (P^<>#0) do
   SomeByteSizedOperation;

if the string type has some multibyte values, obviously the code for
  C:=S[i];
will be rather cumbersome. But it will guarantee you the I-th character
from the string. Since C will be FlorianChar, it'll be at least an integer
(2 bytes encoding info, 2 bytes actual value)

Michael.



More information about the fpc-pascal mailing list