home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 18 REXX / 18-REXX.zip / filechar.zip / filechar.abs < prev    next >
Text File  |  2002-01-27  |  5KB  |  109 lines

  1. 1. Introduction
  2.  
  3.    You don't need this file (FILECHAR.ABS) to use FILECHAR.CMD.
  4.  
  5.    FILECHAR.CMD is a trivial OS/2 REXX script used to determine
  6.    all legal filename characters and their AKAs on HPFS and FAT.
  7.  
  8.    If you're only interested in my results see the four files
  9.         FILECHAR.437            (new result after CHCP 437)
  10.         FILECHAR.850            (new result after CHCP 850)
  11.         FILECOLD.850            (old result after CHCP 850)
  12.         FILECHAR.004            (new result after CHCP 1004)
  13.  
  14.    These files have been created on my system by commands like
  15.         CHCP 437 & FILECHAR > FILECHAR.437
  16.         CHCP 850 & FILECHAR > FILECHAR.850
  17.  
  18.    The old FILECOLD.850 reflects results before installing the
  19.    new "Euro-codepage" (codepage 850 with Euro-symbol hex. D5).
  20.    On my WARP 3 system "old" is fixpack 17, and "new" is e.g.
  21.    fixpack 40.  I never intended to publish FILECHAR.CMD, but
  22.    the different results for with vs. without Euro-symbol are
  23.    IMHO quite alarming.
  24.  
  25. 2. Configuration
  26.  
  27.    If all legal filename characters depending on file system
  28.    (FAT vs. HPFS etc.), codepage (437 vs. 850 etc.), and even
  29.    installed fixpack are documented somewhere, then please
  30.    tell me where...  Until then FILECHAR.CMD works by trial
  31.    and error.  You have to "configure" FILECHAR.CMD for your
  32.    system by editing two lines, replace...
  33.  
  34.         HPFS.. = 'D:\TMP\'   /* HPFS directory */
  35.         OFAT.. = 'F:\TMP\'   /*  FAT directory */
  36.  
  37.    ... by existing HPFS- resp. FAT-directories on your system.
  38.    You may use root-directories, e.g. OFAT.. = 'C:', or even
  39.    other file systems, as long as you have write access resp.
  40.    know how to interpret the results.
  41.  
  42.    Hint:  FILECHAR.CMD deletes all created temporary files
  43.    ---?---$, and this works faster on drives without "DELDIR".
  44.  
  45. 3. Operation
  46.  
  47.    FILECHAR.CMD simply tries to create 255 files ---?---$ in
  48.    both directories, where ? is hex. 01 .. hex. FF (255), by
  49.    appending the letter ? to ---?---$.  For some characters
  50.    like # the file ---#---$ finally contains only # on both
  51.    FAT and HPFS in codepage 437 or 850.
  52.  
  53.    The file ---Z---$ probably contains Z and z for HPFS and
  54.    FAT:  OS/2 would treat files zzz, ZZZ, zZz, etc. as the same
  55.    file, although HPFS supports mixed case filenames.  If you
  56.    have write access on a *NIX-filesystem then zzz, ZZZ, and
  57.    zZz would be three different files.  The most (in)famous
  58.    examples are makefile, Makefile, MAKEFILE, etc. ;-)
  59.  
  60.    The file ---E---$ may contain 6 characters in codepage 437:
  61.    E, e, é, ê, ë, and è are treated as identical in file names.
  62.    Of course FILECHAR.CMD does not only create ---?---$ files,
  63.    it also evaluates and eventually deletes these files.
  64.  
  65. 4. Usage
  66.  
  67.         FILECHAR -h        usage infos (dito -u, -?, etc.)
  68.         FILECHAR --         long result lines (upto 255 columns)
  69.         FILECHAR           short result lines (upto  79 columns)
  70.  
  71.    The short format skips 0 .. 9 (known unique legal characters)
  72.    to get less result lines.  The long format contains all valid
  73.    filename characters, about 164 columns in "new" codepage 850.
  74.  
  75.    The output format should be obvious.  Characters in a line
  76.    marked by HPFS (resp. FAT) are valid in HPFS (FAT) filenames.
  77.  
  78.    Characters in a line marked by "aka" are treated as identical
  79.    with the character(s) in the same column, notably the next
  80.    HPFS- resp. FAT-line character above it.  Short format only:
  81.    If there is no aka-line below a HPFS- resp. FAT-line, then
  82.    these characters are legal and unique.
  83.  
  84.    In long format you get exactly one long HPFS-line and one
  85.    long FAT-line with as many aka-lines as needed in the worst
  86.    case.  In the "new" codepage 850 there is only one aka-line,
  87.    i.e. at most lower and upper case are treated as identical.
  88.  
  89.    Characters in a line marked by "not" are not supported on
  90.    HPFS (resp. FAT).  HPFS does not support "/:<>\| in addition
  91.    to anything below hex. 20 (32, space).  FAT does not support
  92.    "+,./:;<=>[\]|.  Often programs have difficulties with the
  93.    characters +,.;=[] working on HPFS but not in a FAT.
  94.  
  95. 5. Caveats
  96.  
  97.    FILECHAR.CMD only tests ---?---$.  So if characters depend
  98.    on the position within a filename, then FILECHAR.CMD cannot
  99.    detect it.  Examples:  leading or trailing spaces generally
  100.    don't work, but spaces within a name are okay (even in a FAT,
  101.    compare "WP ROOT. SF" etc.).  Trailing dots don't work on
  102.    HPFS, a leading dot may have a special meaning (*NIX), many
  103.    programs treat the last dot as THE DOT, and in a FAT dots are
  104.    not supported (except from the implicit 8+3 dot).
  105.  
  106.    For "FAT" read "good old DOS FAT", all I know about FAT32
  107.    is that it exists.  The same holds for HPFS vs. HPFS386.
  108.    Send any comments to Frank.Ellermann@t-online.de
  109.