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 Genero Business Development Language User Guide, chapter "Localization".

On Linux®/UNIX™, the DVM locale is defined by the LANG or LC_ALL environment variables, which 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:

<?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>

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

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

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. So source files must be created/edited in the encoding of the server where fglcomp and fglrun will be executed.