Hello Johanna,
Migration to UTF-8 is not a trivial process and the motivation must be to support multiple languages in your application.
If your motivation is to support multiple languages in the same instance of your application / database, there is no choice you have to migrate to UTF-8.
But if you will keep using your current language and move to UTF-8 because it's the new standard, you better keep using your current single-byte ISO-885xx locale (SBCS).
When using UTF-8, you enter the world of variable-sized, multi-byte character sets (MBCS).
In UTF-8:
a = 1 byte
é = 2 bytes
是 = 3 bytes
Furthemore:
If, in your .4gl source you do something like
LET c = mystr[10,11]
This is by default using BYTE length semantics, even when using UTF-8.
So this means extract one byte (not a char) at position 10.
This byte can be valid (a single A in ASCII), but any other non-ASCII byte will be a piece of a UTF-8 char (= invalid)
To leave the code untouched with UTF-8, Genero supports CHAR length semantics with FGL_LENGTH_SEMANTICS=CHAR environment variable.
In the above code, 10 and 11 become character positions, not byte positions.
Similarly, the LENGTH() function will return a number of characters (instead of bytes in the default BYTE length semantic)
Now the fun:
Informix does not support char length semantics, a VARCHAR(20) means 20 bytes, even in UTF-8.
OK, Informix provides the SQL_LOGICAL_CHAR server param (onconfig) to apply a ration to the size of CHAR/VARCHAR columns in CREATE TABLE / ALTER TABLE, but that's all.
This does not enable full char length semantics: the SQL LENGTH() function will continue to return a number of bytes :-)
You may want to contact your support center for more details.
PLEASE PLEASE PLEASE Read also carefully:
https://www.joelonsoftware.com/2003/10/08/the-absolute-minimum-every-software-developer-absolutely-positively-must-know-about-unicode-and-character-sets-no-excuses/http://4js.com/online_documentation/fjs-fgl-manual-html/#c_fgl_localization_038.htmlIt is very important to understand the principle and constraints of locale / charset support in Genero.
Especially: The locale used at compile time (if not ASCII) must be locale used at runtime and thus the database client locale.
To introduce more flexibility, we have implemented localized strings:
http://4js.com/online_documentation/fjs-fgl-manual-html/#c_fgl_localized_strings_001.htmlSeb