Sign in Join
Wiki copytemporary

Revision 2 of 2, by WikiArchive on 11-4-2026. The page as it is now.

EncConv

About

EncConv is a package which gives unit EncConv, to convert text to/from UTF8. It was based on LazUtils' unit LConvEncoding, but API was changed and simplified. The list of supported encodings is the same as in LConvEncoding.

Author: Alexey Torgashin

License: MPL 2.0

Changes since LConvEncoding

pascal
type
  TEncConvId = (
    eidUTF8,
    eidUTF8BOM,
    eidUCS2LE,
    eidUCS2BE,

    eidCP1250,
    eidCP1251,
    eidCP1252,
    eidCP1253,
    eidCP1254,
    eidCP1255,
    eidCP1256,
    eidCP1257,
    eidCP1258,

    eidCP437,
    eidCP850,
    eidCP852,
    eidCP861,
    eidCP865,
    eidCP866,
    eidCP874,

    {$IFnDEF encconv_noasian}
    eidCP932,
    eidCP936,
    eidCP949,
    eidCP950,
    {$ENDIF}

    eidISO1,
    eidISO2,
    eidISO3,
    eidISO4,
    eidISO5,
    eidISO7,
    eidISO9,
    eidISO10,
    eidISO13,
    eidISO14,
    eidISO15,
    eidISO16,

    eidCPMac,
    eidKOI8R,
    eidKOI8U,
    eidKOI8RU
    );
pascal
function EncConvFindEncoding(const s: string): TEncConvId;

function EncConvertFromUTF8(const S: string; Enc: TEncConvId): string;
function EncConvertToUTF8(const S: string; Enc: TEncConvId): string;

function EncConvGetANSI: TEncConvId;
function EncConvGetOEM: TEncConvId;

Download

GitHub: https://github.com/Alexey-T/EncConv


From the Free Pascal wiki, page "EncConv", as it stood on 2022-12-13 after a change by Alextp, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's Licensing page. If you have concerns about this material, message the admin.