Character string encoding

The runtime system stores and handles character strings in a given application locale, defined by environment settings.

When reading or writing character strings from/to a channel, no character set conversion is done. The other end of the channel must use the same encoding as the runtime system.

$ cat ch.4gl
-- This source is using UTF-8 encoding
    DEFINE ch base.Channel
    LET ch = base.Channel.create()
    CALL ch.openFile("myfile.txt","w")
    CALL ch.writeLine("abcéúíôû")
    CALL ch.close()

$ fglcomp ch.4gl && fglrun ch.42m

$ file myfile.txt
myfile.txt: UTF-8 Unicode text