UCDATAREADME.txt 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208
  1. #
  2. # $Id: UCDATAREADME.txt,v 1.1 1999/01/08 00:19:20 ftang%netscape.com Exp $
  3. #
  4. MUTT UCData Package 1.9
  5. -----------------------
  6. This is a package that supports ctype-like operations for Unicode UCS-2 text
  7. (and surrogates), case mapping, and decomposition lookup. To use it, you will
  8. need to get the "UnicodeData-2.0.14.txt" (or later) file from the Unicode Web
  9. or FTP site.
  10. This package consists of two parts:
  11. 1. A program called "ucgendat" which generates five data files from the
  12. UnicodeData-2.*.txt file. The files are:
  13. A. case.dat - the case mappings.
  14. B. ctype.dat - the character property tables.
  15. C. decomp.dat - the character decompositions.
  16. D. cmbcl.dat - the non-zero combining classes.
  17. E. num.dat - the codes representing numbers.
  18. 2. The "ucdata.[ch]" files which implement the functions needed to
  19. check to see if a character matches groups of properties, to map between
  20. upper, lower, and title case, to look up the decomposition of a
  21. character, look up the combining class of a character, and get the number
  22. value of a character.
  23. A short reference to the functions available is in the "api.txt" file.
  24. Techie Details
  25. ==============
  26. The "ucgendat" program parses files from the command line which are all in the
  27. Unicode Character Database (UCDB) format. An additional properties file,
  28. "MUTTUCData.txt", provides some extra properties for some characters.
  29. The program looks for the two character properties fields (2 and 4), the
  30. combining class field (3), the decomposition field (5), the numeric value
  31. field (8), and the case mapping fields (12, 13, and 14). The decompositions
  32. are recursively expanded before being written out.
  33. The decomposition table contains all the canonical decompositions. This means
  34. all decompositions that do not have tags such as "<compat>" or "<font>".
  35. The data is almost all stored as unsigned longs (32-bits assumed) and the
  36. routines that load the data take care of endian swaps when necessary. This
  37. also means that surrogates (>= 0x10000) can be placed in the data files the
  38. "ucgendat" program parses.
  39. The data is written as external files and broken into five parts so it can be
  40. selectively updated at runtime if necessary.
  41. The data files currently generated from the "ucgendat" program total about 56K
  42. in size all together.
  43. The format of the binary data files is documented in the "format.txt" file.
  44. Mark Leisher <mleisher@crl.nmsu.edu>
  45. 13 December 1998
  46. CHANGES
  47. =======
  48. Version 1.9
  49. -----------
  50. 1. Fixed a problem with an incorrect amount of storage being allocated for the
  51. combining class nodes.
  52. 2. Fixed an invalid initialization in the number code.
  53. 3. Changed the Java template file formatting a bit.
  54. 4. Added tables and function for getting decompositions in the Java class.
  55. Version 1.8
  56. -----------
  57. 1. Fixed a problem with adding certain ranges.
  58. 2. Added two more macros for testing for identifiers.
  59. 3. Tested with the UnicodeData-2.1.5.txt file.
  60. Version 1.7
  61. -----------
  62. 1. Fixed a problem with looking up decompositions in "ucgendat."
  63. Version 1.6
  64. -----------
  65. 1. Added two new properties introduced with UnicodeData-2.1.4.txt.
  66. 2. Changed the "ucgendat.c" program a little to automatically align the
  67. property data on a 4-byte boundary when new properties are added.
  68. 3. Changed the "ucgendat.c" programs to only generate canonical
  69. decompositions.
  70. 4. Added two new macros ucisinitialpunct() and ucisfinalpunct() to check for
  71. initial and final punctuation characters.
  72. 5. Minor additions and changes to the documentation.
  73. Version 1.5
  74. -----------
  75. 1. Changed all file open calls to include binary mode with "b" for DOS/WIN
  76. platforms.
  77. 2. Wrapped the unistd.h include so it won't be included when compiled under
  78. Win32.
  79. 3. Fixed a bad range check for hex digits in ucgendat.c.
  80. 4. Fixed a bad endian swap for combining classes.
  81. 5. Added code to make a number table and associated lookup functions.
  82. Functions added are ucnumber(), ucdigit(), and ucgetnumber(). The last
  83. function is to maintain compatibility with John Cowan's "uctype" package.
  84. Version 1.4
  85. -----------
  86. 1. Fixed a bug with adding a range.
  87. 2. Fixed a bug with inserting a range in order.
  88. 3. Fixed incorrectly specified ucisdefined() and ucisundefined() macros.
  89. 4. Added the missing unload for the combining class data.
  90. 5. Fixed a bad macro placement in ucisweak().
  91. Version 1.3
  92. -----------
  93. 1. Bug with case mapping calculations fixed.
  94. 2. Bug with empty character property entries fixed.
  95. 3. Bug with incorrect type in the combining class lookup fixed.
  96. 4. Some corrections done to api.txt.
  97. 5. Bug in certain character property lookups fixed.
  98. 6. Added a character property table that records the defined characters.
  99. 7. Replaced ucisunknown() with ucisdefined() and ucisundefined().
  100. Version 1.2
  101. -----------
  102. 1. Added code to ucgendat to generate a combining class table.
  103. 2. Fixed an endian problem with the byte count of decompositions.
  104. 3. Fixed some minor problems in the "format.txt" file.
  105. 4. Removed some bogus "Ss" values from MUTTUCData.txt file.
  106. 5. Added API function to get combining class.
  107. 6. Changed the open mode to "rb" so binary data files will be opened correctly
  108. on DOS/WIN as well as other platforms.
  109. 7. Added the "api.txt" file.
  110. Version 1.1
  111. -----------
  112. 1. Added ucisxdigit() which I overlooked.
  113. 2. Added UC_LT to the ucisalpha() macro which I overlooked.
  114. 3. Change uciscntrl() to include UC_CF.
  115. 4. Added ucisocntrl() and ucfntcntrl() macros.
  116. 5. Added a ucisblank() which I overlooked.
  117. 6. Added missing properties to ucissymbol() and ucisnumber().
  118. 7. Added ucisgraph() and ucisprint().
  119. 8. Changed the "Mr" property to "Sy" to mark this subset of mirroring
  120. characters as symmetric to avoid trampling the Unicode/ISO10646 sense of
  121. mirroring.
  122. 9. Added another property called "Ss" which includes control characters
  123. traditionally seen as spaces in the isspace() macro.
  124. 10. Added a bunch of macros to be API compatible with John Cowan's package.
  125. ACKNOWLEDGEMENTS
  126. ================
  127. Thanks go to John Cowan <cowan@locke.ccil.org> for pointing out lots of
  128. missing things and giving me stuff, particularly a bunch of new macros.
  129. Thanks go to Bob Verbrugge <bob_verbrugge@nl.compuware.com> for pointing out
  130. various bugs.
  131. Thanks go to Christophe Pierret <cpierret@businessobjects.com> for pointing
  132. out that file modes need to have "b" for DOS/WIN machines, pointing out
  133. unistd.h is not a Win 32 header, and pointing out a problem with ucisalnum().
  134. Thanks go to Kent Johnson <kent@pondview.mv.com> for finding a bug that caused
  135. incomplete decompositions to be generated by the "ucgendat" program.
  136. Thanks go to Valeriy E. Ushakov <uwe@ptc.spbu.ru> for spotting an allocation
  137. error and an initialization error.