[Info-vax] C RTL decc$translate_name - The Java way

John E. Malmberg wb8tyw at qsl.network
Mon Jul 18 22:13:41 EDT 2011


On 7/18/2011 6:30 AM, A famous IT technical writer wrote:
> Hello,
>
> As written in the overview of this technical paper, it aims at turning
> any ODS-2 or ODS-5 VMS file syntax into a Unix file syntax for a
> further Unix style file specification processing. The code therein
> contained is intended for direct use by Java based languages such as
> JRuby or Jython.

The following legal file names are flagged as illegal in your test results:

$ create proxy^.2^.5.c.save;32
<ctrl-z>
create <>g^+^+
<ctrl-z>

Directory LCL_ROOT:[wrapper]
proxy^.2^.5^.c.save;32
g^+^+.;1

Escape characters are only required if the file name parser or DCL could 
confuse the character for some other syntax.

The <> syntax has been legal in VMS since day 1.

I think that in recent versions of VMS, the number of illegal printable 
ODS-5 characters has also been greatly reduced.  The VMS 7.3 
documentation is definitely too old to use as a complete ODS-5 
specification.

Directory LCL_ROOT:[wrapper]

foo^"bar.;1         foo^/bar.;1         foo^:bar.;1
foo^<bar.;1         foo^>bar.;1         foo^\bar.;1
foo^|bar.;1

The following VMS to UNIX translations are in common use:

1. VMS CRTL default: Drops non-printing characters in Unix filenames.
    "./ foo.bar" becomes "[]foo.bar".

2. Common utilities like ZIP/UNZIP:  Substitute "_" for some non-ODS-2 
characters.

3. Pathworks V5/V6 encoding on ODS-2:  __xx replaces illegal ODS-2 
characters.  Pathworks V5 treats the first "." as the type delimiter, V6 
treats the last "." as the type delimiter.

4. TCP NFS encoding as documented in the VMS HP TCP/IP manual when 
mounted as ODS-2 volumes.

5. VTF-7 Unicode encoding, which prior to VMS 8.4, the CRTL could not 
translate into UNIX format filenames.  This includes the ^Uxxx syntax.

6. UTF-8 encoding.  Prior to VMS 8.4 the CRTL encodes this as VTF-7 ^Xxx 
encoding, which is incompatible with VTF-7 Unicode applications.  With 
VMS 8.4, the CRTL can optionally translate between VTF-7 and UTF-8.

7. ODS-5 special characters escaped with ^.

Programs that want to be able to display the contents on any directory 
in "unescaped" format, or find any file will need to know how to 
translate all these methods, and in some cases need some hints as to 
which translation to use.

Regards,
-John
wb8tyw at qsl.network
Personal Opinion Only



More information about the Info-vax mailing list