home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / protocol / charset.txt < prev    next >
Text File  |  2020-01-01  |  3KB  |  58 lines

  1. PROPOSED ADDITION TO "ISO-KERMIT" PROPOSAL
  2.  
  3. This discussion applies to the "Level 1" part of the proposal, in which
  4. a single character set is used in Kermit's transfer syntax.
  5.  
  6. What happens when the file character set and the transfer character don't
  7. match?  For example, when the current file character set is, say, the 7-bit
  8. SWISS NRC, and the transfer character set is, say, CYRILLIC?  The draft did
  9. not consider the possibility that there might not be a translation for each
  10. conceivable pair of file and transfer character sets.  Let's consider this
  11. issue from each angle.
  12.  
  13. 1. The file sender.  One solution is obvious: as soon as the user gives the
  14. SEND command, the program issues an error message: "Inappropriate Transfer
  15. Character Set" and returns to the prompt.
  16.  
  17. 2. A Kermit server that receives a GET command could issue the same error
  18. message, but in an error packet.  Then the user would have to issue a REMOTE
  19. SET TRANSFER CHARACTER SET xxx command, and then reissue the GET command.
  20.  
  21. 3. A Kermit receiver can issue an error message when the user gives the
  22. RECEIVE command if the current file and transfer character sets don't jibe.
  23. But any transfer character set specified in the incoming attribute packet (if
  24. use of attribute packets has been negotiated) will override the current global
  25. setting.  If it is inappropriate for the current file character set, the
  26. receiver can issue an error packet and the user will have to give SET commands
  27. to fix things.  (It's not OK to simply cancel the current file using "X" in
  28. the ACK, because the user will have no idea why this happened.)
  29.  
  30. In these circumstances, can the Kermit program adjust itself automatically,
  31. rather than failing?  Let's look at each case.
  32.  
  33. 1. User gives SEND command.  So far, no protocol has taken place, so there is
  34. no reason not to tell the user something is wrong and let the user take
  35. corrective action.  After all, how could the program decide whether the file
  36. character set or transfer character set should take priority?
  37.  
  38. 2. Server gets GET command.  Same reasoning as (1).  No automatic recovery.
  39.  
  40. 3. Receiver gets Attribute packet.  In this case, we can decide to trust the
  41. transfer character set given in the A-packet.  If we do, we can change our
  42. file character set automatically to the one that best accommodates the data
  43. that is being transferred.
  44.  
  45. To accomplish (3), each implementation of Kermit will need a list of
  46. permissible file character sets for each transfer character set.  When a file
  47. arrives with a particular transfer character set X, if the the current file
  48. character set is not on X's list, the program picks one from the list.  Which
  49. one?  If the computer does not have any character sets that include Latin-1 as
  50. a subset (including Latin-1 itself), then it must pick a more restricted set
  51. based on some criterion.  Perhaps this should be the SET LANGUAGE command.
  52. For example, if the incoming file is Latin-1, it could contain text in any of
  53. at least 15 different languages.  If we are using a 7-bit NRC, then this would
  54. tell us which one to translate the Latin-1 into.
  55.  
  56. Comments?
  57.  
  58.