Library /sys$common/syshlp/helplib.hlb  —  CRTL  Feature Logical Names, DECC$FILENAME_ENCODING_UTF8
    C RTL routines that deal with filenames now support filenames in
    UTF-8 encoding when given in UNIX style.

    For example, on an ODS-5 disk the OpenVMS DIRECTORY command
    supports a filename with the following characters:

    disk:[mydir]^U65E5^U672C^U8A9E.txt

    This filename contains three UCS-2 characters (call them xxx,
    yyy, and zzz for typographical purposes) meaning "day", "origin",
    and "language", respectively.

    With UTF-8 support enabled, a C program can now read the filename
    from the VMS directory and use that filename as an UTF-8 encoded
    string.

    For example, opendir("/disk/mydir") followed by a readdir will
    place the following into the d_name field of the supplied dirent
    structure:

    "\xE6\x97\xA5\xE6\x9C\xAC\xE8\xAA\x9E.txt"

    One of the following calls can then open this file:

    open("/disk/mydir/\xE6\x97\xA5\xE6\x9C\xAC\xE8\xAA\x9E.txt",O_RDWR,0)
    open("/disk/mydir/xxxyyyzzz.txt", O_RDWR,0)

    The "\xE6\x97\xA5" above is the byte stream E697A5, which
    represents the xxx character in UTF-8 encoding.

    This feature enhances the UNIX portability of international
    software that uses UTF-8 encoded filenames.

    The DECC$FILENAME_ENCODING_UTF8 feature logical controls whether
    or not the C RTL allows and correctly interprets Unicode UTF-8
    encoding for filenames given in UNIX style.

    This logical is undefined by default, and the C RTL behavior is
    to accept filenames as ASCII and Latin-1 format.

    This feature works only on ODS-5 disks. Therefore, to enable
    Unicode UTF-8 encoding, you must define both the DECC$FILENAME_
    ENCODING_UTF8 and DECC$EFS_CHARSET logicals to ENABLE.
Close Help