[fpc-pascal] Unicode file routines proposal

Martin Schreiber fpmse at bluewin.ch
Wed Jul 2 10:24:02 CEST 2008


On Wednesday 02 July 2008 09.32:17 Mattias Gaertner wrote:
> On Tue, 1 Jul 2008 18:55:44 +0200
>
> Martin Schreiber <fpmse at bluewin.ch> wrote:
> > On Tuesday 01 July 2008 18.32:30 Mattias Gärtner wrote:
> > > > In this routines length(widestring), widestring[index],
> > > > pwidechar^, pwidechar[index], pwidechar + offset, pwidechar -
> > > > pwidechar and inc(pwidechar)/dec(pwidechar) are used often. This
> > > > can't be done with utf-8 strings.
> > >
> > > Ehm, do you know, that UTF-8 has the advantage, that many ascii
> > > functions work without change?
> > > For example ReplaceChar or searching a substring?
> >
> > Sure, but for layout calculation and the like we need fast access to
> > codepoints.
>
> Can you point me to an example function, where this is critical?
>
For example lib/common/kernel/msedrawtext.pas:223, procedure layouttext.

Martin



More information about the fpc-pascal mailing list