TBuffer class
class function Convert(Text: PByte; ByteCount: Integer; CodePage: TBuffCodePage): TBuffString; overload; {$ifdef UseInline} inline; {$endif}
class function Convert(Text: TBuffString; CodePage: TBuffCodePage): TBuffString; overload; {$ifdef UseInline} inline; {$endif}
class function Convert(Text: PByte; ByteCount: Integer; CodePage, InitialCodePage: TBuffCodePage): TBuffString; overload; {$ifdef UseInline} inline; {$endif}
The Convert methods convert byte arrays to unicode.
The 1st method simply converts Text from CodePage to unicode.
If you have loaded a text into a unicode string, but actually the text is not coded in unicode, then you can use the 2nd method to convert it to unicode.
The 3rd method is like the second, but the miscoded string is in a byte array like in the 1st method.