[fpc-devel] ansistring <--> widestring conversion

peter green plugwash at bircd.org
Sun Mar 20 18:00:34 CET 2005


btw theese changes have already been committed (i sent them personally to
fpk). It seems like this mail was held for approval or something (i
previously thought it had been dropped)

> -----Original Message-----
> From: fpc-devel-bounces at lists.freepascal.org
> [mailto:fpc-devel-bounces at lists.freepascal.org]On Behalf Of peter green
> Sent: 11 March 2005 03:33
> To: fpc-devel at lists.freepascal.org
> Subject: [fpc-devel] ansistring <--> widestring conversion
>
>
> i post here a heavilly modified version of the widestring code
> (and a couple
> of files from the xml code that depend on it)
>
> i have made the ansi <--> wide conversion routines take a buffer
> and length
> as input but make the return in an ansistring/widestring var parameter i
> believe this gives a good compromise between performance and flexibility
> (most other ways of returning a variable length string are hacky
> to say the
> least) furthermore i think the cases where the output isn't being put into
> an ansistring or widestring will be very rare anyway.
>
> i also made the default/fallback conversion do a direct mapping of all
> values up to 255 rather than just up to 127 and made it use a ?
> rather than
> a space to replace unknown codes.
>
> this code seems to all compile ok but for some reason some gtk2 stuff has
> suddenly failed on me (which since grep didn't turn up anything widestring
> related seems very strange) preventing me from completing a make
> all. im not
> sure if this happens with the unmodified snapshot as well. the
> code has had
> no functional testing yet (does anyone know how to fun a modified compiler
> through the testsuite?)
>





More information about the fpc-devel mailing list