home *** CD-ROM | disk | FTP | other *** search
/ High Voltage Shareware / high1.zip / high1 / DIR4 / ZWDOS.ZIP / HZ.TXT < prev    next >
Text File  |  1992-08-01  |  2KB  |  52 lines

  1.  
  2. [This document should be read with the HZ interpreter turned off.]
  3.  
  4. This is only a brief tutorial to get you started with the HZ 
  5. specification. It is not meant to be complete, and I can't even
  6. guarantee that it is 100% correct. For the original HZ specification,
  7. please refers to Fung Fung Lee's documents. (see HZ-2.0.tar.Z in
  8. ahkcus.org:src/unix.)
  9.  
  10.  
  11. In the HZ specification, each Chinese character is represented by
  12. 2 ASCII characters -- the same characters you see in English
  13. documents. This property enables Chinese text to be safely trans-
  14. mitted through any networks that can safely transmit ASCII characters,
  15. which is the big reason why we are using HZ on the net.
  16.  
  17. Since the HZ characters and ASCII characters are the same, there
  18. must be some way to tell them apart. The HZ specification says that
  19. each block of HZ Chinese characters must be immediately preceeded
  20. by a ~{ sequence and immediately followed by a ~} sequence. For
  21. example:
  22.  
  23.   ~{UbJGR;>dVPND!#~}
  24.  
  25. ZWDOS gives you the facilities to input Chinese characters, but it
  26. doesn't help you get them into the HZ format. You must supply the
  27. ~{ and ~} sequences yourself. i.e., in order to input HZ-coded
  28. Chinese characters with ZWDOS, you must (1) type ~{, (2) input the
  29. Chinese characters, (3) type ~} to finish it off.
  30.  
  31. It is important that your HZ documents confirm to the HZ spec
  32. closely in order for your document to be readable for everyone.
  33. There are many HZ readers out there and not all of them are like
  34. ZWDOS -- the fact that ZWDOS is tolerant of certain errors doesn't
  35. mean other softwares will do the same. To maximize HZ conformity,
  36. you should observe these simple guidelines:
  37.  
  38.   (1) ALWAYS close each ~{ sequence with a ~} sequence on the
  39. same line.  Forgetting the ~} at the end of a line of Chinese
  40. characters may generate an error with some HZ decoders.
  41.  
  42.   (2) DO NOT embed ASCII text inside a sequence of Chinese 
  43. characters. Always use ~} to switch to ASCII mode before entering
  44. ASCII text. If you only need one or two ASCII characters, you
  45. can also type # before typing each ASCII character.
  46.  
  47. Also, please realizes that the sequence ~~{ does NOT indicate
  48. the start of a Chinese sequence. Here the first ~ is an escape
  49. character telling the HZ decoder not to interpret the following
  50. ~{ sequence.
  51.  
  52.