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