README.chartrans 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  1. Lynx CHARTRANS
  2. Features (in addition to those which Lynx 2.7.1 already has):
  3. - Can (attempt to) translate from any document charset to any display
  4. character set, *IF* the document charset is known by a translation
  5. table (compiled in at installation).
  6. - New method to define character sets: used for input charset as well
  7. as display character set, translation tables compiled in from
  8. separate files (one per charset). One table is designated as default
  9. and can be used for fallback translation to 7-bit replacements for
  10. display.
  11. - New method for specifying translations of SGML entities.
  12. - Unicode (UTF-8) support: can (attempt to) decode and translate UTF-8 to
  13. display character set, or pass through UTF to display (if terminal
  14. or console understands UTF-8). [raw display of UTF only tested with Slang
  15. so far, does not always position everything correctly on screen]
  16. - Support for CHARSET attribute on A tag (and sometimes LINK), as in HTML
  17. i18n RFC 2070 and W3C HTML 4.0 drafts. A link can suggest the target's
  18. charset in this way.
  19. - Support for ACCEPT-CHARSET attribute of FORM tags.
  20. - EXPERIMENTAL, currently enabled only for Linux console:
  21. can (attempt to) automatically switch terminal mode and load new
  22. code pages on change of display character set.
  23. - some minor changes: sometimes invalid characters were displayed in a hex
  24. notation Uxxxx (helps debugging, but I also regard it as at least not
  25. worse than showing the wrong char without warning), now they are not
  26. displayed to reduce garbage.
  27. Additions/changes to user interface:
  28. - many new Display Character Sets are available on O)ptions screen.
  29. (One can use arrow keys, HOME, END etc. for cycling through the list
  30. or use selection from popup box, as for other options.)
  31. - new command line flags:
  32. -assume_charset=... assume this as charset for documents that don't
  33. specify a charset parameter in HTTP headers
  34. -assume_local_charset=... assume this as charset of local file
  35. -assume_unrec_charset=... in case a charset parameter is not recognized;
  36. docs also available as ASSUME_CHARSET etc. in lynx.cfg
  37. In "Advanced User" mode, ASSUME_CHARSET can be changed during a session
  38. from the Options Screen.
  39. - The "Raw" toggle (from -raw flag, '@' key, or Options screen)
  40. o toggles the assumption "Default remote charset is same as Display
  41. Character Set" on or off.
  42. Toggling of the assumed charset is between Display Character Set and
  43. the specified ASSUME_CHARSET or, if they are the same, between the
  44. specified ASSUME_CHARSET and ISO-8859-1.
  45. o The default for raw mode now depends on the Display Character Set as
  46. well as on the specified ASSUME_CHARSET value.
  47. o should work as before for CJK charsets (turning CJK-mode on or off).
  48. o If the effective ASSUME_CHARSET and the Display Character Set are
  49. unchanged from the ISO-8859-1 default, toggling "Raw" may have some
  50. additional effect for characters that can't be translated.
  51. (Try the "Transparent" Display Character Set for more "rawness".)
  52. Requirements: same as for Lynx in general :)
  53. The chartrans code is now merged with Wayne Buttle's changes for
  54. 32-bit MS Windows and DOS/DJGPP, with Thomas Dickey's and Jim Spath's
  55. emerging auto-configure mechanism, and with BUGFIXES from Foteos
  56. Macrides. See the accompanying file CHANGES for the current
  57. status.
  58. A warning:
  59. In some cases undisplayable bytes may still get sent to the terminal
  60. which are then interpreted as control chars, there is no protection
  61. against if strange things are defined in the table files.
  62. HOW TO INSTALL:
  63. (4) before compiling:
  64. Check top level makefile or Makefile and userdefs.h as usual.
  65. NOTE that there is a new "#define" in userdefs.h for MAX_CHARSETS
  66. near the end (in "Section 3.").
  67. (5) Building Lynx:
  68. Compiling the chartrans code is now integrated into the normal
  69. installation procedures for UNIX (configure script) and other
  70. platforms.
  71. What's supposed to happen (in addition to the usual things when
  72. building Lynx): in the new subdirectory src/chrtrans, make should
  73. first compile the auxiliary program `makeuctb', then invoke that
  74. program to create xxxxx_yyy.h files from the provided xxxxx_yyy.tab
  75. translation table files. (See README.* files in src/chrtrans for
  76. more info.)
  77. If all goes well, just invoking make from the top-level Lynx dir
  78. as usual should do everything automatically. If not, the makefiles
  79. may need some tweaking... or:
  80. (6) Some things to look at if compilation fails:
  81. In src/chrtrans/UCkd.h there is a typedef for an unsigned 16bit
  82. numeric type which may need to be changed for your system.
  83. See comment near top there.
  84. For recompiling Lynx, `make clean' should not be necessary if only
  85. files in src/chrtrans have been changed. On the other hand
  86. may not propagate to the src/chrtrans directory (depending how things
  87. are going with auto-config), you may have to cd to that directory
  88. and `make clean' there to really clean up there.
  89. (7) To customize (add/change translation tables etc.):
  90. See README.* files in src/chrtrans.
  91. Make the necessary changes there, then recompile.
  92. (A general `make clean' should not be necessary, but make sure
  93. the ...uni.h file in src/chrtrans gets regenerated.)
  94. Note that definition of new character entities (if e.g., you want
  95. Lynx to recognize Ž) are not covered by these table files,
  96. they have to be listed in entities.h.
  97. _If you are on a Linux system_ and using Lynx on the console (i.e.
  98. not xterm, not a dialup *into* the Linux box), you can compile
  99. with -DEXP_CHARTRANS_AUTOSWITCH. This is very useful for testing
  100. the various Display Character Sets, Lynx will try to automatically
  101. change the console state. You need to have the Linux kbd package
  102. installed, with a working `setfont' command executable by the user,
  103. and the right font files - check the source in src/UCAuto.c for
  104. the files used and/or to change them!
  105. NOTE that with this enabled,
  106. - Lynx currently will not clean up the console state at exit,
  107. it will probably left like the last Display Character Set you used.
  108. - Loading a font is global across _all_ virtual text consoles, so
  109. using Lynx (compiled with this flag) may change the appearance of
  110. text on other consoles (if that text contains characters
  111. beyond US-ASCII).
  112. (8) Some suggested Web pages for testing:
  113. <URL: http://www.tezcat.com/~kweide/lynx-chartrans/test/>
  114. <URL: http://www.isoc.org:8080/>,
  115. especially
  116. <URL: http://www.isoc.org:8080/liste_ml.htm>.
  117. <URL: http://www.accentsoft.com/un/un-all.htm>
  118. (9) Please report bugs, unexpected behavior, etc.
  119. to <lynx-dev@nongnu.org>.
  120. Suggestions for improvement would be welcome, as well as
  121. contributed translation tables (for stuff that is not available
  122. at ftp://dkuug.dk or ftp://ftp.unicode.org).
  123. KW 1997-11-06