home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / unix / bsd / 10751 < prev    next >
Encoding:
Text File  |  1992-12-30  |  18.8 KB  |  406 lines

  1. Newsgroups: comp.unix.bsd
  2. Path: sparky!uunet!cs.utexas.edu!sun-barr!ames!agate!dog.ee.lbl.gov!hellgate.utah.edu!fcom.cc.utah.edu!cs.weber.edu!terry
  3. From: terry@cs.weber.edu (A Wizard of Earth C)
  4. Subject: Re: Dumb Americans (was INTERNATIONALIZATION: JAPAN, FAR EAST)
  5. Message-ID: <1992Dec30.061759.8690@fcom.cc.utah.edu>
  6. Keywords: Han Kanji Katakana Hirugana ISO10646 Unicode Codepages
  7. Sender: news@fcom.cc.utah.edu
  8. Organization: Weber State University  (Ogden, UT)
  9. References: <1992Dec19.083137.4400@fcom.cc.utah.edu> <2564@titccy.cc.titech.ac.jp> <1992Dec30.010216.2550@nobeltech.se>
  10. Date: Wed, 30 Dec 92 06:17:59 GMT
  11. Lines: 393
  12.  
  13. In article <1992Dec30.010216.2550@nobeltech.se> ppan@nobeltech.se (Per Andersson) writes:
  14. >In article <2564@titccy.cc.titech.ac.jp> mohta@necom830.cc.titech.ac.jp (Masataka Ohta) writes:
  15. >>
  16. >>Do you know that Japan vote AGAINST ISO10646/Unicode, because it's not
  17. >>good for Japanese?
  18. >>
  19. >>>So even if the Unicode standard ignores backward compatability
  20. >>>with Japanese standards (and specific American and European standards),
  21. >>>it better supports true internationalization.
  22. >>
  23. >>The reason of disapproval is not backward compatibility.
  24. >>
  25. >>The reason is that, with Unicode, we can't achieve internationalization.
  26. >
  27. >But, what has Unicode got to do with ISO-10646 ? Has the promised (very much
  28. >needed IMHO) revision of Unicode arrived ? (1.1). Unicode is a 16bit character-
  29. >set which I know did ugly things with asiatic languages. I thought 10646,
  30. >which is a 32bit standard (by ISO !) did not, except for doing something
  31. >the turks didn't like, don't remember what it was. Enlighten me !
  32.  
  33.  
  34. The following is my trieste on the Unicode standard, and why I think it
  35. is applicable or can be made applicable to internationalization of 386BSD.
  36.  
  37. Let me restate here (as I do below) that I do not believe the attribution
  38. of language by the ordinal value of a character is a goal of the storage
  39. representation of the character glyph.
  40.  
  41. The goal of attribution of the language a particular character is
  42. adequately satisfied by the choice of I/O mechanisms and mappings, and can
  43. also be satisfied by localized attribution of a file within the storage
  44. mechanism for that file.  The only particular hurdle to overcome is the
  45. provision of multiple concurrent language specific I/O mechanisms for the
  46. benefit of translators.  This has been discussed elsewhere.
  47.  
  48.  
  49. ======================= ======================= =======================
  50. ======================= ======================= =======================
  51. ======================= ======================= =======================
  52.  
  53. ISO10646 is based on the Unicode standard.
  54.  
  55. The "ugly thing Unicode does with asiatic languages" is exactly what it
  56. does with all other languages:  There is a single lexical assignment for
  57. for each possible glyph.
  58.  
  59. This doesn't "screw up" anything, unless you expect your character set to
  60. be attributed by language... ie:
  61.  
  62.                     English '#' character
  63.                         |
  64.                         v
  65.     -+-+-+-+-+-+-+-+-+-+-+-+-        -+-+-+-+-+-+-+-+-+-+-+-+-
  66. ...  | |!|"|#|$|%|&|'|(|)|*| ...     ... | |!|"| |$|%|&|'|(|)|*| ...
  67.     -+-+-+-+-+-+-+-+-+-+-+-+-        -+-+-+-+-+-+-+-+-+-+-+-+-
  68.  
  69.      US ASCII                UK ASCII
  70.  
  71. In the example above, the lexical set for US ASCII and UK ASCII are not
  72. intersecting, even though they contain exactly the same glyphs for all
  73. but one character
  74.  
  75. Thus by the lexical order of a character, you can tell if it is an American,
  76. English, Japanese, or Chinese character.  The argument against Unicode, as
  77. I understand it so far, is that the ordinal value of a character is not an
  78. indicator of which language it came from... ie:
  79.  
  80.     Character set excerpt                Which set (count)
  81.  
  82.  
  83.         /----------------------\
  84.         |               |
  85.     -+-+-+-+-+-+-+-+-+-+-+-+-       |
  86. ...  | |!|"| |$|%|&|'|(|)|*| ...   |            UK ASCII (96)
  87.     -+-+-+-+-+-+-+-+-+-+-+-+-       |
  88.       | | |   | | | | | | |       |
  89.       v v v   v v v v v v v       |
  90.     -+-+-+-+-+-+-+-+-+-+-+-+-       |
  91. ...  | |!|"|#|$|%|&|'|(|)|*| ...   |            US ASCII (96)
  92.     -+-+-+-+-+-+-+-+-+-+-+-+-       \------\
  93.       | | | | | | | | | | |          |
  94.       v v v v v v v v v v v          v
  95.     -+-+-+-+-+-+-+-+-+-+-+-+-        -+-+-+-+-
  96. ...  | |!|"|#|$|%|&|'|(|)|*| ...     ... | | | |    Unicode (34348)
  97.     -+-+-+-+-+-+-+-+-+-+-+-+-        -+-+-+-+-
  98.  
  99.  
  100. This demonstrates the "problem", wherein the lexical order of the Unicode
  101. character set does not map to lexically adjacent characters in the ASCII
  102. sets.  This behaviour is greatly exaggerated for Japanese/Chinese character
  103. sets, which have relatively large numbers of non-intersecting characters
  104. (as opposed to the 7 non-intersecting characters for most Western European
  105. languages and US ASCII), thus leaving a relatively large number of "gaps"
  106. in the lexical tables for a particular Asian language... ie:
  107.  
  108.  
  109.     * = A valid character in a language
  110.  
  111.     -+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
  112. ...  |*|*| |*|*|*|*|*| |*|*| | | | |*|*|*|*|*|*|*| | ...    Japanese
  113.     -+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
  114.  
  115.     -+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
  116. ...  | |*|*| |*|*| |*|*|*|*|*|*|*|*|*| |*|*| | |*|*| ...    Chinese
  117.     -+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
  118.  
  119.  
  120. [ I do not view the attribution of language by the ordinal value of a
  121.   character as a goal of the storage representation of the character
  122.   glyph.  This is, perhaps, where I differ with the (stated by various
  123.   individuals) Japanese assessment of the Unicode standard. ]
  124.  
  125. The fact that ISO-Latin-1 is used as the base character set for Unicode
  126. (and is thus in an pre-existing lexical order), and languages with glyphs
  127. that are non-existant in other languages (ie: Tamil and Arabic) are also
  128. in a preexisting adjacent lexical order is seen as Eurocentric (or US
  129. centric, when one considers that the ISO-Latin-1 set is a superset of US
  130. ASCII).
  131.  
  132. The rationale is the Americans and Western Europeans get to keep the
  133. majority of their existing equipment without modification, while the
  134. Japanese are required to give up their existing investment in the JIS
  135. standard and equipment which supports it.
  136.  
  137.  
  138. THIS IS PATENTLY FALSE ON SEVERAL GROUNDS:
  139.  
  140. 1)    The storage mechanism (in this case, Unicode) does not have to
  141.     bear a direct relationship to the input/output mechanism.  For
  142.     instance, a "Unicode font" for use in Japan could contain only
  143.     those Glyphs used in Japanese, just as a Unicode font for use
  144.     in the US can be limited to US ASCII.  As long as the additional
  145.     characters are not used, there is no reason for them to actually
  146.     exist in the font.
  147.  
  148. 2)    Localization is, and for the forseeable future will continue to
  149.     be, necessary for the input mechanism.  This will be true of the
  150.     large glyph count languages forever because of the awkward input
  151.     mechanisms required.  The most likely immediate change will be in
  152.     the small glyph count languages, such as those of Western Europe.
  153.     The additional penalty for small glyph count languages will be a
  154.     16k table for Unicode to Local ISO standard translation, and a
  155.     512b table for Local ISO standard to Unicode translation.  There
  156.     is also the lookup penalty that will be paid referencing these
  157.     tables.
  158.     
  159. 3)    The base change for the Japanese language will be a 128k table for
  160.     16 bits worth of short-to-short JIS to Unicode lexical translation,
  161.     and a 128k table for the reverse translation for output.  The
  162.     most likely immediate change here will be a direct change to the
  163.     JIS translation table output from JIS to Unicode, thus eliminating
  164.     any additional translation penalties for Japanese over and above
  165.     that required by the large glyph set.  In the case of most existing
  166.     Japanese hardware, this is a simple ROM replacement.  Thus Japanese
  167.     I/O will realize a performance increase over and above that realized
  168.     by native input of Western languages.  This is a large glyph count
  169.     only advantage shared by Japanese and Chinese.
  170.  
  171. 4)    The storage requirements for text files in small glyph count
  172.     languages double from 8 bits to 16 bits per glyph when using any
  173.     internationalization mechanism which allows for large glyph count
  174.     languages.  This is a significant concession from users of small
  175.     glyph count languages in the interests of allowing for future
  176.     internationalization from which they will not profit significantly.
  177.     Methods of avoiding this expansion (such as Runic encoding [the
  178.     commonly accepted mechanism] and file system language attribution
  179.     [my concept] carry performance or loss-of-information penalties
  180.     for small glyph countt language users.  This is discussed later).
  181.  
  182.  
  183. Unicode is NOT to the advantage of Western users as has been claimed... to
  184. the contrary, internationalization carries significant penalties for the
  185. Western user, discounting entirely the programming issues involved.  The
  186. relatively low cost of enforced localization by simply making code 8 bit
  187. clean is highly attractive... but localization has significant drawbacks
  188. for the non-Western users, and in particular large glyph count languages
  189. like Japanese and Chinese.
  190.  
  191.  
  192. PERFORMANCE AND STORAGE OPTIMIZATIONS
  193.  
  194. It is possible to overcome, or at least alleviate somewhat, several
  195. disadvantages to Western users by selective optimization.  In particular,
  196. the selection of optimistic assumptions in the initial lexical order is
  197. of benefit to Western users, and explicitly for US ASCII or ISO Latin-1
  198. users.
  199.  
  200. These benefits are for the most part dependant upon the small glyph count
  201. of Western languages, and do not translate to a specific advantages of
  202. lexical order that large glyph count languages could benefit from.  In
  203. other words, using a JIS set to enable all Japanese characters to be
  204. lexically adjacent WOULD NOT RESULT IN THE JAPANESE USER GAINING THE SAME
  205. BENEFITS.  THE BENEFITS *DEPEND* ON BOTH LEXICAL ORDER AND ON THE FACT OF
  206. A SMALL GLYPH COUNT LANGUAGE.
  207.  
  208. 1)    OPTIMIZATION:    Type 1 Runic Encoding.
  209.     BENEFITS:    US ASCII and ISO-Latin-1.
  210.             File size is an indicator of character count for
  211.             beneficiary languages.
  212.             File size is mathematically related to the
  213.             character count for language not intersecting the
  214.             beneficiary ISO-Latin-1 glyph set.
  215.     COSTS:        Additional storage for Runic encoded languages.
  216.             Additional cost for character 0 in text files
  217.             in benificiary languages.
  218.             File size is not an indicator of character count
  219.             for languages which partially intersect the
  220.             beneficiary ISO-Latin-1 glyph set.
  221.             Difficulty in Glyph substitution.
  222.     IMPLEMENTATION:
  223.  
  224.     Type 1 Runic Encoding uses the NULL character (lexical position 0)
  225.     to indicate a rune sequence.  For all users of the ISO-Latin-1
  226.     character set or lexically adjacent subsets (ie: US ASCII), a NULL
  227.     character is used to introduce a sequence of 8-bit characters
  228.     representing a 16 bit character whose ordinal value is in excess
  229.     of the ordinal value 255.  Type 1 Runic encoding allows almost all
  230.     existing Western files to remain unchanged, as nearly no text
  231.     files contain NULL characters.
  232.  
  233. 2)    OPTIMIZATION:    Type 2 Runic Encoding.
  234.     BENEFITS:    US ASCII.
  235.             Lesser benefits for ISO-Latin-1 and other sets
  236.             intersecting with US ACSII.
  237.             Frequency encoding allows shorter sequences of
  238.             characters to represent the majority of Runic
  239.             encoded characters in large glyph set languages
  240.             than is possib in Type 1 Runic Encoding.
  241.             File size is an indicator of character count for
  242.             US ASCII text files.
  243.             File size is mathematically related to the
  244.             character count for language not intersecting the
  245.             beneficiary US ASCII glyph set.
  246.     COSTS:        Additional storage for Runic encoded languages.
  247.             Additional cost for characters with an ordinal
  248.             value in excess of 127 in text files in benificiary
  249.             languages.
  250.             File size is not an indicator of character count
  251.             for languages which partially intersect the
  252.             beneficiary US ASCII glyph set.
  253.             Difficulty in Glyph substitution.
  254.     IMPLEMENTATION:
  255.  
  256.     Type 2 Runic Encoding uses characters with an ordinal value in
  257.     the range 128-255 to introduce a sequence of 8-bit characters
  258.     representing a 16 bit character whose ordinal value is in excess
  259.     of the ordinal value 127.  Type 2 Runic encoding allows frequency
  260.     encoding (by virtue of multiple introducers) of 128*256 (32k)
  261.     glyphs.  Since the Unicode set consists of 34348 glyphs, this is
  262.     an average of two 8-bit characters per Runic Encoded glyph for
  263.     the vast majority (32768) of encoded glyphs.  This is significant
  264.     when compared to the average of three 8-bit characters per encoded
  265.     glyph for Type 1 Runic encoding.
  266.  
  267.  
  268. [ For the obvious reason of file size no longer directly representing what
  269.   has been, in the past, meaningful information, I personally dislike the
  270.   concept of Runic encoding, even though it will tend to effect only those
  271.   languages which are permissable in an "8-bit clean" internationalization
  272.   environment, thus not effecting me personally.  An additional penalty is
  273.   in glyph substition within documents.  A single glyph substitution could
  274.   potentially change the size of a file -- requiring a shift of the contents
  275.   of the file on the storage medium to account for the additional space
  276.   requirements of the substitute glyph.  A final penalty is the input buffer
  277.   mechanisms not being able to specify a language-independant field length
  278.   for data input.  This is particularly nasty for GUI and screen based input
  279.   such as that found in most commercial spreadsheets and databases.  For
  280.   these reasons, I can not advocate Runic encoding or the XPG3/XPG4 standards
  281.   which appear to require it. ]
  282.  
  283.  
  284. 3)    OPTIMIZATION:    Glyph Count Attribute (in file system)
  285.     BENEFITS:    Non-direct beneficiary languages of the Runic
  286.             Encoding, assuming use of Type 1 or Type 2
  287.             Runic Encoding.
  288.     COSTS:        File system modification.
  289.             File I/O modifications.
  290.     IMPLEMENTATION:
  291.  
  292.     A Glyph Count Attribute kept as part of the information on a file
  293.     would restore the ability to relate directly available information
  294.     about a file with the character count of the text in the file.
  295.     This is something that is normally lost with Runic encoding.  There
  296.     are not insignificant costs associated with this in terms of the
  297.     required modifications to the File I/O system to perform "glyph
  298.     counting".  This is especially significant when dealing with the
  299.     concept of glyph substitution in the file.
  300.  
  301.  
  302. 4)    OPTIMIZATION:    Language Attribution (in file system)
  303.     BENEFITS:    All languages capable of existing in "8-bit clean"
  304.             environments (all small glyph count languages).
  305.     COSTS:        File system modification.
  306.             File I/O based translation (buffer modification
  307.             processing time).
  308.             Requirement of conversion to change to/from a
  309.             multilingual storage format with non-intescting
  310.             "8-bit clean" sets (ie: Arabic and US ASCII).
  311.             Conversion utilities.
  312.             Changes to UNIX utilities to allow access to
  313.             and manipulation of attributions.
  314.     IMPLEMENTATION:
  315.  
  316.     The Language Attribution kept as part of the information on a file
  317.     allows 8-bit storage of any language for which an "8-bit clean"
  318.     character set exists/can be produced.  Unicode buffers of 16-bit
  319.     glyphs are converted on write to the "8-bit clean" character set
  320.     glyph.  This requires a 64k table to allow for direct index
  321.     conversion.  In practice, this can be a 16k table due to the
  322.     lexical location of the small glyph count languages within the
  323.     Unicode character set.  The conversion on read requires a 512b
  324.     table to allow direct indext conversion of 256 8-bit values into
  325.     the 256 corresponding Unicode 16-bit characters.
  326.  
  327. [ This is clever, if I do say so myself ]
  328.  
  329.  
  330. 5)    OPTIMIZATION:    Sparse Character Sets For Language Localization
  331.     BENEFITS:    Reduced character set/graphic requirements.
  332.             Continued use of non-graphic devices (depends
  333.             on being used in concert with Language Attribution).
  334.             Reduced memory requirements for fonts in graphical
  335.             environments (like X).
  336.     COSTS:        Non-localized text files can not benefit.
  337.             Device channel mapping for devices supporting less
  338.             than the full Unicode character set.
  339.             Translation tables and lookup time for devices
  340.             supported using this mechanism.
  341.  
  342.     IMPLEMENTATION:
  343.  
  344.     [Prexisting] Language specific fonts for "8-bit clean" languages
  345.     can be used, as can existing fonts for Unicode character sets
  346.     for systems like X, which allow sparse font sets.  Basically,
  347.     since there is no need to display multilingual messages in a
  348.     localized environment, there is no need to use fonts/devices
  349.     which support an internationalized character set.  For instance,
  350.     using a DEC VT220, the full ISO-Latin-1 font is available for
  351.     use.  Thus for languages using only characters contained in the
  352.     ISO-Latin-1 set, it is not necessary to supply other glyphs
  353.     within the set as long as output mapping of Unicode to the device
  354.     set is done (preferrably in the tty driver).  Similarly, JIS
  355.     devices for Japenese I/O are not required to support, for instance,
  356.     Finnish, Arabic, or French characters.
  357.  
  358. [ This is also clever, in that it does not was the existing investments
  359.   in hardware. ]
  360.  
  361.  
  362.  
  363. ADMITTED DRAWBACKS IN UNICODE:
  364.  
  365. The fact that lexical order is not maintained for all existing character
  366. sets (NOTE: NO CURRENT OR PROPOSED STANDARD SUPPORTS THIS IDEA!) means that
  367. a direct arithmatic translation is not possible for, for instance, JIS to
  368. Unicode mappings; instead a table lookup is required on input and output.
  369. This is not a significant penalty anywhere but languages which do not
  370. require multiple keystroke input on their respective input devices and
  371. which are not lexically adjacent in the Unicode set (ie: Turkish).  The
  372. penalty is a table lookup on I/O rather than a direct arithmetic translation
  373. (an add or subtract depending on direction).  NOTE THAT THIS IS NOT A PENALTY
  374. FOR JIS INPUT, SINE MULTICHARACTER INPUT SEQUENCES REQUIRE A TABLE LOOKUP TO
  375. IMPLEMENT REGARDLESS OF THE STORAGE.
  376.  
  377. The fact that all character sets do not occur in their local lexical order
  378. means that a particular character can not be identified as to language by
  379. its ordinal value.  This is a small penalty to pay for the vast reduction
  380. in storage requirements between a 32-bit and a 16-bit character set that
  381. contains all required glyphs.  The fact that Japanese and Chinese characters
  382. can not be distinguished as to language by ordinal value is no worse than
  383. the fact that one can not distinguish an English 's' in the ISO-Latin-1 set 
  384. from a French 's'.  The significance of language attribution must be handled
  385. by the input (and potentially output) mechanisms in any case, and thus they
  386. must be locale specific.  This is sufficient to provide information as to
  387. the language being output, since input and output devices are generally
  388. closely associated.
  389.  
  390. ======================= ======================= =======================
  391. ======================= ======================= =======================
  392. ======================= ======================= =======================
  393.  
  394.  
  395.                     Terry Lambert
  396.                     terry@icarus.weber.edu
  397.                     terry_lambert@novell.com
  398. ---
  399. Any opinions in this posting are my own and not those of my present
  400. or previous employers.
  401. -- 
  402. -------------------------------------------------------------------------------
  403.                                         "I have an 8 user poetic license" - me
  404.  Get the 386bsd FAQ from agate.berkeley.edu:/pub/386BSD/386bsd-0.1/unofficial
  405. -------------------------------------------------------------------------------
  406.