CodePages

Delphi library for text conversion between different code pages.
Available free with full source code.

Library API

function Convert(const Data: AnsiString; FromCodePage, ToCodePage: Integer): AnsiString; overload;
function Convert(const Data: TByteDynArray; FromCodePage, ToCodePage: Integer): TByteDynArray; overload;

// code page => UCS-2
function Decode(const Data: AnsiString; CodePage: Integer): WideString;
function DecodeBytes(const Data: TByteDynArray; CodePage: Integer): WideString;

// UCS-2 => code page
function Encode(const Data: WideString; CodePage: Integer): AnsiString;
function EncodeBytes(const Data: WideString; CodePage: Integer): TByteDynArray;
								

Download

Related links