#DefineFunction udfCodepageConvert (strTextFrom, intCpFrom, intCpTo) intPrevCodepage = ChrSetCodepage (intCpFrom) strUnicode = ChrStringToUnicode (strTextFrom) ChrSetCodepage (intCpTo) strTextTo = ChrUnicodeToString (strUnicode) ChrSetCodepage (intPrevCodepage) Return strTextTo ; (c)Detlev Dalitz.20100220. #EndFunction ;Test. intCpFrom = 850 intCpTo = 1252 strTextFrom = "" For intN = 128 To 255 strTextFrom = strTextFrom : Num2Char (intN) Next strTextTo = udfCodepageConvert (strTextFrom, intCpFrom, intCpTo) strMsgTitle = "Codepage conversion from " : intCpFrom : " to " : intCpTo : " (upper half of the codepage set, characters 128..255)" strMsgText = "Cp" : intCpFrom : @LF : strTextFrom : @LF : @LF : "Cp" : intCpTo : @LF : strTextTo : @LF : @LF : "Note: This is the Message Box ANSI view to the characters!" Pause (strMsgTitle, strMsgText) strTextFrom = "Gltigkeitsbereich von nderungen. ... ursprngliche Einstellungen mssen ausgefhrt werden ... fr alle Befehle gendert." strTextTo = udfCodepageConvert (strTextFrom, intCpFrom, intCpTo) strMsgTitle = "Codepage conversion from " : intCpFrom : " to " : intCpTo : " (example string)" strMsgText = "Cp" : intCpFrom : @LF : strTextFrom : @LF : @LF : "Cp" : intCpTo : @LF : strTextTo : @LF : @LF : "Note: This is the Message Box ANSI view to the characters!" Pause (strMsgTitle, strMsgText) :CANCEL Exit