home *** CD-ROM | disk | FTP | other *** search
/ High Voltage Shareware / high1.zip / high1 / DIR4 / ZWDOS.ZIP / ZWDOS.DOC < prev    next >
Text File  |  1993-03-05  |  20KB  |  474 lines

  1.  
  2.  
  3.                                 ZWDOS
  4.  
  5.           'zW-HZ' Chinese Text System for IBM PC/Compatibles
  6.  
  7.  
  8.              Documentations and Software (C) Copyright by
  9.                    Ya-Gui Wei, 1991, 1992, 1993
  10.                          All Rights Reserved
  11.  
  12.                       Ya-Gui Wei, P.O. Box 2231
  13.                       Bloomington Indiana 47402
  14.                   January 27, 1993
  15.  
  16.  
  17.  
  18. * A LITTLE INTRODUCTION
  19.  
  20.  
  21. This program displays Chinese text on screen on a very carefree
  22. fashion. After you start the computer, you run it once at the
  23. beginning (you can set up your computer to do this automatically).
  24. Then you can go on doing whatever you want as usual. For example, 
  25. you can do word processing or e-mail with your usual softwares. 
  26. Whenever any Chinese text appears on screen, such as a Chinese e-mail 
  27. you have just received, the program jumps into action and displays
  28. it as Chinese characters. 
  29.  
  30. Painstaking software engineering techniques were employed so that the
  31. program takes the minimal amount of system resources, is fast and
  32. compatible with most application programs. For example, the program 
  33. takes only 20+KB of system memory comparing to 200-300KB taken by 
  34. most Chinese systems. 
  35.  
  36. The program supports viewing of 'zW' and 'HZ'-encoded Chinese text,
  37. pinyin input and editing with DOS editors, and printing on HP
  38. LaserJet printers, and IBM or Epson compatible 9 pin and 24 pin dot 
  39. matrix printers.
  40.  
  41.  
  42.  
  43. * LICENSE STATEMENT
  44.  
  45.  
  46.   SUMMARY: Version 2.20 of ZWDOS is distributed under the "Shareware"
  47.   concept, an arrangement under which the user gets a free trial period
  48.   for a piece of software before deciding to pay for it. The length
  49.   of the free trial period varies among different categories of users.
  50.   Special provisions for full-time student users are described.
  51.  
  52. This software product (ZWDOS) is protected by the United States copyright 
  53. law and international copyright treaties. This license statement grants 
  54. you certain privileges to use or distribute this product provided that
  55. the following conditions are strictly observed. This license statement 
  56. may be superseded by explicit written license statements from the copyright
  57. holder.
  58.  
  59. By taking up the free trial offer described below, you are agreeing
  60. to all the conditions described in this licesing statement. If you
  61. find any conditions described herein as unacceptable, the free trial 
  62. offer will not be applicable for you and you should stop using this
  63. software immediately.
  64.  
  65. Distribution of this software is permitted if and only if ALL of the
  66. following conditions are observed: A, all files originally associated 
  67. with this package are distributed together without addition, ommision 
  68. or modification; B, the distributor does not charge a fee for the
  69. distribution; C, this product is not distributed together with any
  70. product or service that the distributor is selling for a profit.
  71.  
  72. Individual users who have obtained a copy of this software product 
  73. through proper distribution channels are hereby granted a free trial 
  74. period of sixty (60) days provided that this software is not used in 
  75. a commercial, business, or institutional setting, or in performing a 
  76. salary paying job. Users satisfying the above conditions and who are
  77. full-time students are hereby granted a free trial period which will
  78. continue until the day the user ceases to be a full-time student. 
  79. All other users are granted a free trial period of exactly one (1) day.
  80.  
  81. The free trial period shall start at the first moment the user (or 
  82. any person employed by the user) receives, downloads, or otherwise 
  83. obtains a copy, or part of a copy, of this software product.
  84.  
  85. After the free-trial period expires, the user may not continue to use
  86. this software until he/she obtains a permanent license from the copyright
  87. holder by paying a registration fee of fifteen U.S. Dollars (US$15).
  88.  
  89. This software comes with no warranty or guarantee whatsoever. By taking
  90. up the free trial offer and/or paying the registration fee, the user
  91. agrees to indemnify and hold the software author and copyright holder
  92. harmless from and against any claims or liabilities out of the use of
  93. this software product.
  94.  
  95. Note: The font library (CCLIB.16) provided with the mail distribution 
  96. of ZWDOS is in the public domain and is not subject to the conditions
  97. stipulated in this license statement.
  98.  
  99.  
  100.  
  101. * HOW TO REGISTER 
  102.  
  103. The US$15 Registration fee is payable to: Ya-Gui Wei, PO Box 2231, 
  104. Bloomington, IN 47402. Payment is accepted in cheques and money
  105. orders only. Checques must be payable through a US or Canadian bank.
  106. Add US$3 S&H if requesting disk with registration. If requesting disk 
  107. without registering, send US$5 S&H with promise to register within 
  108. 60 days or return the product. All S&H fees are not refundable.
  109.  
  110.  
  111.  
  112. * INSTALLATION
  113.  
  114. After downloading the programs, place all the files in the same directory
  115. (say "\zw"), then add the following lines to your AUTOEXEC.BAT file:
  116.  
  117.   cd \zw
  118.   zwvga     <== use another program if your system is not VGA.
  119.  
  120. That's it!
  121.  
  122. Note that if you have obtained this software via ftp, you must also
  123. download the Chinese character font library (CCLIB.16) seperately.
  124. You may also need to edit the configuration file ZWDOS.CFG to set
  125. up the location of the font file and printer information.
  126.  
  127.  
  128.  
  129. * FILES IN THIS PACKAGE
  130.  
  131.   ZWHERC.COM -  program for Hercules monochrome graphic video systems;
  132.   ZWEGA.COM  -  program for systems with Enhanced Graphic Adaptors;
  133.   ZWVGA.COM  -  program for VGA and compatible systems;
  134.                 [Note: Support for CGA displays has been discontinued.]
  135.   ZWDOS.DOC  -  this document;
  136.   ZWDOS.CFG  -  Configuration file for commonly used command line paramenters.
  137.   ZWNOTES.TXT - software notes on imcompatibilities, bugs, etc.
  138.   SYMBOL.TBL  - List of Guo-Biao symbols.
  139.   ASSODIC.DAT - Associative Dictionary, loaded with the /a option.
  140.   UPDATExx.TXT - Update notes for version xx.
  141.   HZ.TXT     -  a brief tutorial about the HZ specification
  142.   ZAPI.DOC   -  Programmer's Guide to ZWDOS Application Program Interface
  143.   ZAPI.*     -  Example Programs Using ZWDOS Application Program Interface
  144.   CCLIB.16   -  Chinese 16x16 simplified character fonts;
  145.                 [Note: the font file is not part of the ZWDOS package.]
  146.  
  147.  
  148.  
  149. * VIEWING CHINESE TEXT
  150.  
  151.   Viewing is very straight forward. Whenever any Chinese text the 
  152. program recognizes appears on screen, the program jumps into action
  153. automatically - without any human intervention - and displays the
  154. text as Chinese characters. You can continue to use your application
  155. programs as usual in the Chinese mode. Once the Chinese text has
  156. scrolled out of the screen, the screen returned to its usual ASCII
  157. mode.
  158.  
  159. (For users who don't like the automatic switch between Chinese and
  160. ASCII mode, a command line switch has been provided since version
  161. 2.1 for you to disable it. If you use this option you will need to
  162. hit some certain key combinations to display the Chinese text.)
  163.  
  164. The program currently only recognizes 'zW' and 'HZ'-encoded Chinese 
  165. text. The 'zW' decoding in the program is the same as proposed by 
  166. Edmund Lai and me in October 1989, except that it also recognizes the
  167. space character as escapes for ASCII texts. [The original spec
  168. uses '#' as ASCII escapes making ASCII texts and GB ASCII codes
  169. indistinguishable.]  The HZ specification is as proposed by Fung
  170. Fung Lee which was an improvement to 'zW'.
  171.  
  172.  
  173.  
  174. * CHINESE TEXT INPUT
  175.  
  176.  1. Introduction to the 'zW' and 'HZ' specifications.
  177.  
  178. ZWDOS uses ordinary ASCII characters for coding Chinese characters.
  179. This scheme has the advantage that the resulting Chinese file 
  180. can be edited in common ASCII-oriented application programs and
  181. can be safely transmitted through the network. In order to 
  182. distinguish those ASCII characters that represents Chinese text from
  183. those that represents English text, the 'zW' and 'HZ' protocols
  184. are used.
  185.  
  186. [You should turn off the Chinese mode when reading the following
  187. paragraph. The key to do so for ZWDOS is "Alt-}". You can use 
  188. "Alt-{" to turn Chinese mode back on later.]
  189.  
  190. The HZ protocol encloses all Chinese strings between "~{" (a tilde
  191. character followed by the left brace) and "~}" (a tilde followed by
  192. the right brace) strings. The 'zW' protocol specifies all lines
  193. starting with the string "zW" are considered Chinese.  It is
  194. suggested that the user sticks to the "HZ" protocol because it is
  195. more versatile.
  196.  
  197. When using applications not specifically designed to accommodate
  198. the HZ or 'zW' protocols, the user should manually provide the "~{",
  199. "~}", or "zW" strings when entering Chinese text.
  200.  
  201. This is not a complete description of these protocols. More infor-
  202. mation about the HZ protocol can also be found in the file HZ.TXT.
  203.  
  204.  
  205.  2. Chinese Input By Pin-Yin. 
  206.  
  207. Chinese text input operates only when the screen is already in 
  208. Chinese mode. If it is not, you may type in a '~{' sequence (the
  209. HZ sequence for starting a Chinese string) and wait for the screen
  210. to switch to Chinese mode. If you have loaded ZWDOS in manual
  211. mode, you must press the Alt-{ hot keys to switch the screen
  212. to Chinese mode.
  213.  
  214. In the Chinese mode, turning the CapsLock status ON allows you to
  215. input Chinese characters using pinyin. [Think of it as ChineseLock.]
  216.  
  217. The characters in the GuoBiao table are divided into 3 parts and
  218. each part are entered using different methods.
  219.  
  220. Part 1, total of 3755 characters, consists of the most commonly-used
  221. Chinese characters. Characters in this part are entered using pinyin
  222. as follows:
  223.  
  224.   (1) You type in the pinyin of a single character, without tone
  225.   marks. Use Backspace to edit. Esc to escape. [Note: the pinyin for
  226.   "female" ~{E.~} is nyu and "green" ~{BL~} is lyu in our convention.]
  227.  
  228.   (2) After typing in the pinyin, you press the Space Bar to display
  229.   a list of characters for you to choose. The characters are arranged
  230.   in tone order.
  231.  
  232.   You may also type the Enter (Return) key without pressing Space
  233.   Bar. If you do this, the character selection step is by-passed, 
  234.   and the character you last selected for this pinyin or, if you have 
  235.   not selected one, a pre-selected character is entered. This memory
  236.   feature is very useful for speeding up text-entry.
  237.  
  238.   (3) During character selection, you may use the following keys:
  239.        Cursor Left   -  go to previous character
  240.        Cursor Right  -  go to next character
  241.        Cursor Up     -  display previous group of 20 characters
  242.        Cursor Down   -  display next group of 20 characters
  243.        Home          -  go to first of currently displayed characters
  244.        End           -  go to last of currently displayed characters
  245.        Numeric Key n -  go to the nth character in the group of 10
  246.        Ctrl - Left   -  go to first of group of 5
  247.        Ctrl - Right  -  go to last of group of 5
  248.        Enter         -  select character
  249.        Alphabet keys/Backspace - edit pinyin (skip back to stage 1)
  250.  
  251. Part 2, of 3008 characters, consists of the less commonly-used
  252. Chinese characters. Characters in this part are input using pianpang
  253. (radical) index as follows:
  254.  
  255.   (1) As in pinyin input, except that you only type in "x" for the
  256.   pinyin.
  257.  
  258.   (2) Press Space Bar to bring out the list of pianpangs. The
  259.   pianpangs are arranged by order of the number of strokes. Select
  260.   one using the keys as in pinyin input.
  261.  
  262.   (3) A list of characters belonging to the pianpang -- again 
  263.   arranged by stroke number order -- is displayed. Select one and
  264.   press Enter.
  265.  
  266.   If you press Enter instead of Space at the beginning of step (2),
  267.   the previously selected character for "x" is entered.
  268.  
  269. Part 3 of the Guobiao table consists of symbols. All of the symbols
  270. found on a PC keyboard are entered automatically, some converted to
  271. their Chinese counterparts. The remaining symbols need to be typed in
  272. in their GB codes. (See file SYMBOL.TBL).
  273.  
  274. A number of techniques were employed so that ZW-DOS can guess which 
  275. character you may want to use after you type in a pinyin. You will 
  276. find that ZW-DOS's guess score improves considerably after you use 
  277. it for a while.
  278.  
  279. ENTERING HZ CODES:  You must supply the opening and closing tilde-
  280. brace sequences (~{, ~}) of the HZ codes explicitly.  You should
  281. also try to close each ~ { sequence by a ~ } sequence on the same 
  282. line.
  283.  
  284.  
  285.  
  286. * CHINESE TEXT PRINTING
  287.  
  288.  
  289. ZWDOS now supports printing on HP LaserJet printers, and IBM or 
  290. Epson compatible 9-pin and 24-pin dot matrix printers.
  291.  
  292. The procedure for printing Chinese text with ZWDOS is no different 
  293. from printing ASCII texts. You can do print-screen, print from 
  294. applications, copy file to PRN, or use the DOS PRINT command, etc. 
  295. (When using DOS PRINT.EXE, it must be loaded after ZWDOS.)
  296.  
  297. When printing Chinese (zW or HZ) text, the display screen must be 
  298. already in Chinese mode.
  299.  
  300. PRINTING ON LASERJET: When printing on LaserJet, you can print the 
  301. Chinese characters at 3 levels of quality: high, medium, or low, 
  302. selectable from command line. (High quality printing takes longer 
  303. than low quality printing.)  You retain full control on the non-Chinese 
  304. ASCII texts in the file through printer commands.  Additionally, you 
  305. can change the spacing of the Chinese characters by varying the 
  306. spacing of the ASCII texts: each Chinese character is always as wide 
  307. as two ASCII space characters.
  308.  
  309. PRINTING ON DOT MATRIX PRINTERS: the "print quality" switch has no 
  310. effect on dot matrix printers. (24 pin printers always use "medium 
  311. quality" fonts and 9 pin printers always use "low quality" fonts.) 
  312. You retain full control on the appearance of the ASCII text. On 9 pin
  313. printers, the ASCII text may be printed as double-strike -- this is 
  314. normal.
  315.  
  316. Cursor blinking will be slow during printing.
  317.  
  318. Printing Chinese Text from WordPerfect.  WordPerfect (and other word 
  319. processors) adds printer control code to the text being printed. These 
  320. invisible codes may have surprising effects.  For example, when printing 
  321. zW text, printer codes added to the beginning of a line may render the 
  322. line to be an invalid zW line (recall that 'zW' must be at the beginning
  323. of a line). For HZ text, if a line of HZ text is ill-formed, such as 
  324. not closed with a ~} string, printer codes added to the end of a line 
  325. may be mistakenly interpreted as Chinese characters.  This is one more 
  326. reason that we should follow the HZ standard closely.
  327.  
  328. See "Printer-related Command Line Switches" for more information.
  329.  
  330.  
  331.  
  332. * HOT KEYS
  333.  
  334.  
  335. Hot Key Alt-{:
  336.      *  switches to Chinese mode (graphic mode) regardless of
  337.         screen content;
  338.      *  reactivates auto-switching after Alt-} has been used;
  339.      *  refreshes Chinese mode display (except in ZWATT);
  340.      *  forces ZWDOS to reload the Chinese character fonts if 
  341.         they have been lost (perhaps as a result of running a 
  342.         graphic mode program);
  343.      *  toggles "magnifying glass" on/off for ZWCGA. (The "Mag-
  344.         nifying Glass" displays the text on the line where the 
  345.         cursor is in enlarged fonts for easy reading.)
  346.  
  347. Hot Key Alt-}:
  348.      *  switches to ASCII mode (text mode) regardless of screen
  349.         content;
  350.      *  temporarily deactivates auto-switching between Chinese 
  351.         and ASCII modes. The screen will remain in ASCII mode
  352.         until you press Alt-{, which will also reactivate the
  353.         auto-switching. 
  354.  
  355.   
  356.  
  357. * COMMAND LINE SWITCHES AND THE CONFIGURATION FILE
  358.  
  359. [Note: command line switches are not case sensitive.]
  360.  
  361.    1. General Switches
  362.    
  363. /A - load associative dictionary. This dictionary is used to improve
  364.    chance that zw-dos picks the next character for you (after you
  365.    type in the right pinyin, that is.) On average, zw-dos will
  366.    pick the right character more than 80% of the times if you load 
  367.    this dictionary. Since zw-dos tries to learn your phrase usage 
  368.    (this is true even without the /A option), so ZW-DOS's score will 
  369.    improve with longer typing sessions. 
  370.  
  371.    ZW-DOS's memory usage will increase by about 50KB if you loaded 
  372.    the associated dictionary.
  373.  
  374. /D - load zwdos in ASCII mode
  375.    This new switch introduced in version 2.1 is equivalent 
  376.    to hitting the Alt-} key immediately after loading.
  377.  
  378. /DEL -  Delete ZWDOS from memory. Note: you may not be able to
  379.      delete if some other TSRs have been loaded after ZWDOS.
  380.  
  381. /E - Input status line position.
  382.  
  383.    When inputting Chinese characters, the status line (displaying the
  384.    pinyin being typed in and the list of characters to be chosen)
  385.    usually appears at the bottom of the screen.  When using the /e
  386.    switch, however, the status line will appear immediately below
  387.    where the cursor is. The idea is that this may reduce eye movement
  388.    and make the work easier.
  389.  
  390. /FN - Font Name. Lets you use font libraries from other packages.
  391.    Syntax is: "/FN=[[d:]\path\]filename". The filename specified will 
  392.    be the font file. (Square brackets "[]" indicate parts that may
  393.    be omitted.)
  394.  
  395.    When using external font files, make sure that the font files
  396.    are 16 by 16 in dimension and the characters are in GB order.
  397.  
  398. /FG=#,#,# - Font Gap.  Use in conjunction with /FN if neccessary.
  399.    GB font libraries typically have a gap between the symbols and the
  400.    first zone (Qu1) ~{Gx~} of characters. The first # is the offset
  401.    of actual font data in the font file, the second # indicates the
  402.    first missing zone, and the third # refers to the last missing
  403.    zone. Default is "/FG=0,7,14". (Some font files need "/FG=0,10,14".)
  404.  
  405. /H, /? - Display a summary of all command line switches.
  406.  
  407. /M - manual mode
  408.  
  409.    This new switch introduced in version 2.1 loads ZWDOS in 'manual 
  410.    mode', which inhibits the automatic switching between Chinese and
  411.    ASCII screens. All switching, thereafter, must be done manually 
  412.    using the Alt-{, Alt-} key combinations.
  413.  
  414.    This switch is similar to /D except that pressing Alt-{ will not
  415.    re-enable auto-switching.
  416.  
  417. /R - This switch specifies that font-filling (drawing of characters
  418.    of which the fonts are not already in memory) will be by screen 
  419.    order instead of by library order. This may be desirable for slow
  420.    systems, even though this option will actually slow down the
  421.    screen drawing by resulting in considerably more disk head
  422.    movement.
  423.  
  424. /S, /U, /W - Use Simplified, Unsimplified, and Wide fonts. Currently
  425.    only the simplified font is provided. (Obsolete. See /fn)
  426.  
  427. /5 - forced Hercules mode. This switch may forced your video system
  428.    into Hercules graphic mode if it is not the default mode. 
  429.    (ZWHERC only.)
  430.  
  431.  
  432.   2. Printer Related Switches.
  433.  
  434. /PO=# - Printer POrt. # can be 1 or 2, default is 1.
  435.  
  436. /PV=#, /PV, /PH - Print Vertical or Horizontal.
  437.         /PV=1 or /PV - text is printed in traditional, vertical way.
  438.         /PV=0 or /PH - text is printed in modern, horizontal way.
  439.    Default is horizontal.
  440.  
  441. /PT=p_type - Printer Type.
  442.    P_type may be one of the following strings:
  443.         none  - no printer
  444.     dm9   - dot matrix 9 pin (IBM or Epson compatible)
  445.     eps24 - Epson compatible 24 pin dot matrix 
  446.     ibm24 - IBM compatible 24 pin dot matrix
  447.     lj    - laserjet printer (HP LaserJet compatible)
  448.    Default is LaserJet.
  449.  
  450. /PQ=H, /PQ=M, /PQ=L - Print Quality, in High, Medium, or Low.
  451.    Currently for LaserJet only. High quality printing takes
  452.    longer. Default is /PQ=L.
  453.  
  454. /PB - Print Blank.  Whether the HZ/zW delimiters (~}, zW, etc)
  455.    are printed as blank spaces or not printed at all. When /PB=0,
  456.    the delimiters are not printed at all. When /PB or /PB=1, the
  457.    delimiters are printed as two ASCII spaces. This may be useful
  458.    for line-justification purposes. Default is /PB=0.
  459.  
  460.  
  461.   3. The Configuration file.  
  462.  
  463.    Users may create a configuration file ZWDOS.CFG with any text 
  464.    editors and put commonly-used command line parameters there. 
  465.    Lines starting with '#' in the configuration file are considered 
  466.    comments.
  467.  
  468.    Since the configuration file is processed before the actual
  469.    command line, you can temperarily override the configuration file
  470.    settings through command line switches.
  471.  
  472.  
  473. (THE END)
  474.