[fpc-devel] ansistrings and widestrings
Michael Van Canneyt
michael at freepascal.org
Wed Jan 5 17:10:54 CET 2005
On Wed, 5 Jan 2005, peter green wrote:
> where are theese default versions located in the code?
>
In the inc directory of the rtl. wstrings.inc
procedure Wide2AnsiMove(source:pwidechar;dest:pchar;len:SizeInt);
procedure Ansi2WideMove(source:pchar;dest:pwidechar;len:SizeInt);
Michael.
>
> > -----Original Message-----
> > From: fpc-devel-bounces at lists.freepascal.org
> > [mailto:fpc-devel-bounces at lists.freepascal.org]On Behalf Of Alexey
> > Barkovoy
> > Sent: 05 January 2005 07:36
> > To: FPC developers' list
> > Subject: Re: [fpc-devel] ansistrings and widestrings
> >
> >
> > > if i do ansistringvar := widestringvar or widestringvar := ansistringvar
> > > what does the compiler do?
> > >
> > > 1: use the systems default encoding (if so obtained from where?)
> > > 2: use utf-8
> > > 3: use iso-8859-1
> > > 4: use something else?
> > >
> > > furthermore if the encoding used is one not capable of representing all
> > > unicode code points what are the reduction rules used in the
> > conversion from
> > > widestring to ansistring?
> >
> > Compiler internally uses Wide2AnsiMoveProc and Ansi2WideMoveProc
> > functions which
> > can be reassigned by user. Currently their are just maping lower
> > 128 chars in
> > one representation to other. On Windows there are system
> > functions that can be
> > used to do conversion: MultiByteToWideChar and
> > WideCharToMultiByte - these
> > functions can take into account specified or globally set code page.
> >
> >
> > _______________________________________________
> > fpc-devel maillist - fpc-devel at lists.freepascal.org
> > http://lists.freepascal.org/mailman/listinfo/fpc-devel
>
>
> _______________________________________________
> fpc-devel maillist - fpc-devel at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-devel
>
More information about the fpc-devel
mailing list