In ODS-5 there is support for filenames which contain ISO Latin-1 or Unicode
plane 0 characters. Filenames are flagged with a "Name type" which can be
either ODS-2, ISL-1 or UCS-2. In the following these types are used to
describe UTF-8 support.
ODS-2 is used for ODS-2 compatible filenames, with one exception or
addition: there can be lowercase characters in the filename. (These are not
legal characters in ODS-2, but it seems, if one could get these into a
directory file and into the index file, ODS-2 would accept them.)
ISL-1 is used for filenames with
1) non-printable ASCII characters, 0x00 - 0x1f, 0x7f
2) ASCII characters - other than lowercase characters, which are not allowed in
ODS-2 and
3) non-ASCII characters (8-bit), 0x80 - 0xff.
Ad 1) Non-printable ASCII characters in filenames need to be escaped for
input and are escaped tor output. On the VMS command line, the escape
sequence for them is ^xx, where xx is the (hexadecimal) code point in ASCII.
Ad 2) These are characters, which are not allowed in ODS-2, at all or have a
specific meaning in the filename. '~', '#' and '{' are examples for the
first category; '%', and space are examples for the first category and
second category; and ':', '[' and '.' are examples of the second category. On
the VMS command line, all characters, which have a special meaning, '%' is a
wildcard, space is a command line delimiter and ':', '[', '.' are file
specification delimiters, need to be escaped (for input) and are escaped
(for output) when used in a filename. The escape symbol on VMS is ^, which
is followed by the ASCII character - except for space, which for output is
replaced by an underscore ('_').
Ad 3) On the VMS command line, these require an ISO Latin-1 character set to
be loaded for the terminal for input and output of the filename. On the VMS
command line, the escape sequence for for non-printable characters (0x80 -
0x9f, 0xa0) is ^xx, where xx is the (hexadecimal)code point in ISO Latin-1. For unknown
reasons, 0xff is seen as non-printable as well, but it really is printable,
it is 'ÿ'.
UCS-2 is used for filenames with non-ISO Latin-1 characters. That is, for
Unicode plane 0 characters, that have a non-zero value in the upper byte of
the UCS-2 encoding. On the VMS command line, when such characters are used
in a filename, these characters need to be escaped (for input) and are
escaped (for output). The escape sequence for them is "^Uxxxx", where xxxx
is the code point in the Unicode.
On the VMS command line, when you enter a filename with Unicode characters
as ^Uxxxx and with zeros in all the upper bytes, the ODS-5 file name type is
ISL-1 or ODS-2, depending on the lower byte.
In the ods5 file system, without UTF-8 support, disabled with the mount
option vtf7, ODS-2 and ISL-1 filenames are shown as-is. That is, when
listing files from the command line in a terminal, non-printable ASCII
characters may not show or may be interpreted (tab, line feed, etc.) and the
terminal needs to have an ISO Latin-1 character set loaded for non-ASCII
characters, otherwise the filenames are mis-interpreted, usually there is an
'?' shown for the non-ASCII character. UCS-2 filenames are shown with escape
sequences for non-ISO Latin-1 characters: "?xxxx", where xxxx is the code
point in the Unicode. (The escape symbol '?' was choosen, because ODS-5 file
names can not contain the wildcard characters '?' and '*'.)
For vtf7, printing of non-printable ASCII/ISL-1 may change in a future release.
A "?xxxx" escape sequence seems to do a better job. However, as of today, such
filenames are rare.
With UTF-8 support, enabled with the mount option utf8 or the absence of the
mount option vtf7, the ods5 file system shows all filenames as UTF-encoded
strings. Again, non-printable ASCII characters may not show or may be
interpreted (tab, line feed, etc.) Usually they are shown as a question mark.
For example 002-?.;1 which is a filename containing 0x02. In the bash, to
enter
such a filename when using filename completion, a ^B is shown, which is the
associated control character for 0x02:
# ls 002-^B.\;1 002-?.;1 #Because the VMS/ODS file name spaces don't really map, there are exceptions.
# ls -l /vms/isl1.DIR\;1/a* lrwx------ 1 8247 392 7 Dec 22 15:26 /vms/isl1.DIR;1/ahem.;1 -> xä.txtversus
# ls -l /vms/isl1.DIR\;1/a* lrwx------ 1 8247 392 6 Dec 22 15:26 /vms/isl1.DIR;1/ahem.;1 -> xä.txtPlease note, on VMS versions prior to V8.4, symbolic links don't work for target filenames with 8-bit ISO Latin-1 characters (and link filenames are created in uppercase characters although not specified as such):
$ copy tt: tä.txt target, name with ISO Latin-1 character: ä $ $ cre/syml="tä.txt" symlink $ dir/size Directory USR_ODS5:[USER] SYMLINK.;1 -> tä.txt 1 tä.txt;1 1 Total of 2 files, 2 blocks. $ $ ty symlink. %TYPE-W-OPENIN, error opening USR_ODS5:[USER]SYMLINK.;1 as input -RMS-E-DNF, directory not found -SYSTEM-W-NOSUCHFILE, no such file $