[fpc-pascal] Unicode file routines proposal

Mattias Gärtner nc-gaertnma at netcologne.de
Tue Jul 1 18:32:30 CEST 2008


Zitat von Martin Schreiber <fpmse at bluewin.ch>:

> On Tuesday 01 July 2008 13.13:19 Mattias Gärtner wrote:
> > Zitat von Martin Schreiber <fpmse at bluewin.ch>:
> > > On Tuesday 01 July 2008 12.19:26 Mattias Gärtner wrote:
> > > > Zitat von Martin Schreiber <fpmse at bluewin.ch>:
> > > > > I did it with utf-8 and UCS-2, beleave me, it was not negligible.
> > > >
> > > > Where is the code in msegui? (the code that was formerly UTF-8, not the
> > > > old UTF-8 code)
> > >
> > > lib/common/kernel/msedrawtext.pas, mserichstring.pas, msestrings.pas.
> > >
> > > http://sourceforge.net/projects/mseide-msegui
> >
> > Thanks. Can you be little bit more specific? I see a lot of functions. Most
> > of them can treat UTF-8 as 8bit encoding. Unless you want to do something
> > special.
> >
> 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?

Mattias




More information about the fpc-pascal mailing list