Purpose With ConvertText you can convert a text from one codepage to another (ANSI or UTF-8)
Example ConvertText "tx" fromCodePage="ANSI" toCodePage="UTF-8"

The content of the long text variable "tx" is converted from ANSI to UTF-8.

Format ConvertText "textvar" fromCodePage="cp1" toCodePage="cp1"

Converts the content of the long text variable "textvar" from codepage "cp1" to codepage "cp2". The following codepages are supported:

  • ANSI
  • UTF-8

You can omit either fromCodePage= or toCodePage=. GuiXT will then use the frontend codepage for the parameter omitted, i.e. ANSI for  non-Unicode SAP systems and UTF-8 for  Unicode systems.

Tips
&Tricks

If you want to convert a  string contained in a variable V[myvar] you can use a long text variable:

Set text[x] "&V[myvar]"
ConvertText
"x" fromCodePage="ANSI" toCodePage="UTF-8"
Set
V[myvar] "&text[x]"

Components GuiXT + InputAssistant