DVM locale settings in .xcf files

The locale settings for the DVM must be defined in the application .xcf files.

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 DVM locale configuration must be defined in the application specific .xcf file, with the ENVIRONMENT_VARIABLE element.

Note: If the application connects to an SQL database, make sure to define the database client locale. The next examples show how to set the Informix® client environment variables CLIENT_LOCALE and DB_LOCALE.

Example with UTF-8 locale settings in Linux:

Note: When using a UTF-8 locale, consider using char length semantics, with FGL_LENGTH_SEMANTICS=CHAR.
<?xml version="1.0" encoding="UTF-8"?>
<APPLICATION Parent="defaultgwc"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:noNamespaceSchemaLocation="http://www.4js.com/ns/gas/3.20/cfextwa.xsd">
  <EXECUTION>
    <ENVIRONMENT_VARIABLE Id="LC_ALL">en_US.utf8</ENVIRONMENT_VARIABLE>
    <ENVIRONMENT_VARIABLE Id="FGL_LENGTH_SEMANTICS">CHAR</ENVIRONMENT_VARIABLE>
    <ENVIRONMENT_VARIABLE Id="CLIENT_LOCALE">en_us.utf8</ENVIRONMENT_VARIABLE>
    <ENVIRONMENT_VARIABLE Id="DB_LOCALE">en_us.utf8</ENVIRONMENT_VARIABLE>
    <PATH>/app/stores/bin</PATH>
    <MODULE>order_input</MODULE>
  </EXECUTION>
</APPLICATION>

Example with UTF-8 locale settings in Windows:

Note: The Microsoft® C runtime setlocale() ".utf8" code page name is supported starting from Windows 10 build 17134 (April 2018 Update). For older Windows versions, use the BDL UTF-8 fallback ".fglutf8".
<?xml version="1.0" encoding="UTF-8"?>
<APPLICATION Parent="defaultgwc"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:noNamespaceSchemaLocation="http://www.4js.com/ns/gas/3.20/cfextwa.xsd">
  <EXECUTION>
    <ENVIRONMENT_VARIABLE Id="LANG">English_US.utf8</ENVIRONMENT_VARIABLE>
    <ENVIRONMENT_VARIABLE Id="FGL_LENGTH_SEMANTICS">CHAR</ENVIRONMENT_VARIABLE>
    <ENVIRONMENT_VARIABLE Id="CLIENT_LOCALE">en_us.utf8</ENVIRONMENT_VARIABLE>
    <ENVIRONMENT_VARIABLE Id="DB_LOCALE">en_us.utf8</ENVIRONMENT_VARIABLE>
    <PATH>/app/stores/bin</PATH>
    <MODULE>order_input</MODULE>
  </EXECUTION>
</APPLICATION>

Example for a French locale with ISO-8859-1 charset in Linux:

<?xml version="1.0" encoding="UTF-8"?>
<APPLICATION Parent="defaultgwc"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:noNamespaceSchemaLocation="http://www.4js.com/ns/gas/3.20/cfextwa.xsd">
  <EXECUTION>
    <ENVIRONMENT_VARIABLE Id="LC_ALL">fr_FR.ISO8859-1</ENVIRONMENT_VARIABLE>
    <ENVIRONMENT_VARIABLE Id="CLIENT_LOCALE">fr_fr.819</ENVIRONMENT_VARIABLE>
    <ENVIRONMENT_VARIABLE Id="DB_LOCALE">fr_fr.819</ENVIRONMENT_VARIABLE>
    <PATH>/app/stores/bin</PATH>
    <MODULE>order_input</MODULE>
  </EXECUTION>
</APPLICATION>

Example for a French locale with CP-1252 charset in Windows:

<?xml version="1.0" encoding="UTF-8"?>
<APPLICATION Parent="defaultgwc"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:noNamespaceSchemaLocation="http://www.4js.com/ns/gas/3.20/cfextwa.xsd">
  <EXECUTION>
    <ENVIRONMENT_VARIABLE Id="LANG">french_FRANCE.1252</ENVIRONMENT_VARIABLE>
    <ENVIRONMENT_VARIABLE Id="CLIENT_LOCALE">fr_fr.1252</ENVIRONMENT_VARIABLE>
    <ENVIRONMENT_VARIABLE Id="DB_LOCALE">fr_fr.1252</ENVIRONMENT_VARIABLE>
    <PATH>/app/stores/bin</PATH>
    <MODULE>order_input</MODULE>
  </EXECUTION>
</APPLICATION>