我给你一个例子(UTF-8)的,其他的你可以看情况改改……
/* Start Code Dummy */
use "Kernel.bdh"
dll "kernel32.dll"
"WideCharToMultiByte"
function WideCharToMultiByte(in number, in number, ptr, in number, ptr, in number, in number, in number):number;
const
CP_UTF8 := 65001;
dcluser
user
VUser
transactions
TMain : 1;
dclfunc
function fAscii2Utf8(sSource: string): string <API_FUNCTION>
var
sMultiByte,
sHex,
sHexAsString,
sWide : string;
nLen : number;
begin
StrAnsi2Unicode(sWide, Strlen(sSource)*2, sSource);