On 12/26/15, ulrich <rom...@cbox.cz> wrote:

> I need the simplest possible transfer of one unicode character (numeric
> string or integer) to the default windows code page (CP1250).

You mean from codepoint (U+xxxx) to single byte CP1250?

In unit LazUtf8  (in LazUtils from Lazarus):
function UnicodeToUTF8(CodePoint: cardinal): string;

In unit lconvencoding (in LazUtils from Lazarus):
function UTF8ToCP1250(const s: string; SetTargetCodePage: boolean =
false): RawByteString; // central europe

The LazUtils package can be used in console programs as well (it does
not depend on LCL or widgetset).
In lazarus, start a new project (simple program) then use the
projectIspectro to add a dependency on LazUtils package (this will add
the right paths to the project info file).

That should do the trick.

Bart
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to