[fpc-devel] ansistrings and widestrings

Florian Klaempfl F.Klaempfl at gmx.de
Thu Jan 6 10:53:57 CET 2005

Peter Vreman wrote:

>>in wondows terminology (which i presume is where the name ansistring comes
>>from) the windows code page which is often refered to in documentation as
>>the ansi code page CAN be multi byte.
>>more generally i belive an ansistring is usually intended to represent
>>in the platforms local encoding. Whilst a widestring is meant to represent
>>text in utf-16.
>>The platforms local encoding may be a single byte encodeing (iso-8859-?
>>windows-125? etc) it may be a legacy mixed width encoding (EUC-??
>>BIG5 etc) or it may be a unicode transformation format which is a superset
>>of ascii (utf-8).
>>now for dependency reasons i belive that the default conversion functions
>>should remain a "dumb fallback" BUT i also belive that the function
>>prototypes should be designed in such a way as to allow the conversion
>>routines to be replaced with ones that can sesiblly handle the local
>>i've created a page on the wiki for this issue at
> You are welcome to supply patches that fixes the prototypes and new units
> that support more encoding/decoding routines.

I think we should introduce a class widestringmanager :) Lower, upper, 
comparing etc. needs also to take care of unicode encodings.

More information about the fpc-devel mailing list