Rimgaudas Laucius rimga at ktl.mii.lt
Sat Dec 29 14:53:59 CET 2001

> Hello there!!!
> Are there any functions to convert an ansi string to an unicode one.

Here is function from Delphi for directly conversion. But it needs some changes for work with Free Pascal.

function StringToWideChar(const Source: string; Dest: PWideChar;
  DestSize: Integer): PWideChar;
  Dest[MultiByteToWideChar(0, 0, PChar(Source), Length(Source),
    Dest, DestSize - 1)] := #0;
  Result := Dest;

More information about the fpc-pascal mailing list