DVM locale

If application files (such as .4gl, .per, .4st files) contain characters in a specific encoding, the DVM has to run in this encoding.

Setting a DVM locale is described in the chapter on Application locale in the Genero Business Development Language User Guide.

On Linux®/UNIX™, the DVM locale is defined by the LC_ALL environment variable. On Windows® the DVM locale is defined by the LANG environment variable. The configuration can be specified in the GAS executing environment, or with the ENVIRONMENT_VARIABLE child of a WEB_APPLICATION_EXECUTION_COMPONENT element, inside the as.xcf file.

Example in as.xcf defining a KOI8-R (Russian) charset for the DVM in Linux:

<?xml version="1.0" encoding="UTF-8"?>
...
  <COMPONENT_LIST>
     <WEB_APPLICATION_EXECUTION_COMPONENT Id="cpn.wa.execution.local">
       <ENVIRONMENT_VARIABLE Id="FGLDIR">$(res.fgldir)</ENVIRONMENT_VARIABLE>
       <ENVIRONMENT_VARIABLE Id="FGLGUI">$(res.fglgui)</ENVIRONMENT_VARIABLE>
       <ENVIRONMENT_VARIABLE Id="PATH">$(res.path)</ENVIRONMENT_VARIABLE>
       ...
       <ENVIRONMENT_VARIABLE Id="LC_ALL">ru_RU.KIO8-R</ENVIRONMENT_VARIABLE>
       <DVM>$(res.dvm.wa)</DVM>
     </EXECUTION_COMPONENT>
...
</COMPONENT_LIST>

Example in as.xcf defining a KOI8-R (Russian) charset for the DVM in Windows:

<?xml version="1.0" encoding="UTF-8"?>
...
  <COMPONENT_LIST>
     <WEB_APPLICATION_EXECUTION_COMPONENT Id="cpn.wa.execution.local">
       <ENVIRONMENT_VARIABLE Id="FGLDIR">$(res.fgldir)</ENVIRONMENT_VARIABLE>
       <ENVIRONMENT_VARIABLE Id="FGLGUI">$(res.fglgui)</ENVIRONMENT_VARIABLE>
       <ENVIRONMENT_VARIABLE Id="PATH">$(res.path)</ENVIRONMENT_VARIABLE>
       ...
       <ENVIRONMENT_VARIABLE Id="LANG">Windows-1251</ENVIRONMENT_VARIABLE>
       <DVM>$(res.dvm.wa)</DVM>
     </EXECUTION_COMPONENT>
...
</COMPONENT_LIST>

Such WEB_APPLICATION_EXECUTION_COMPONENT definition can then be referenced by an APPLICATION (for an application) element using the <EXECUTION Using="identifier"> tag.

Important: Keep in mind that the character set used by the server at runtime (during program execution) must match the character set used to write programs. Source files must be created/edited in the encoding of the server where fglcomp and fglrun will be executed.