home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / std / internat / 1117 < prev    next >
Encoding:
Text File  |  1993-01-08  |  5.3 KB  |  105 lines

  1. Newsgroups: comp.std.internat
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!magnus.acs.ohio-state.edu!usenet.ins.cwru.edu!agate!overload.lbl.gov!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: <1993Jan9.024546.26934@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: <id.EAHW.92A@ferranti.com> <1993Jan7.033153.12133@fcom.cc.utah.edu> <1993Jan8.092754.6344@prl.dec.com>
  10. Date: Sat, 9 Jan 93 02:45:46 GMT
  11. Lines: 92
  12.  
  13. In article <1993Jan8.092754.6344@prl.dec.com> boyd@prl.dec.com (Boyd Roberts) writes:
  14. >In article <1993Jan7.033153.12133@fcom.cc.utah.edu>, terry@cs.weber.edu (A Wizard of Earth C) writes:
  15. >> 
  16. >> Consider a newline terminated text database containing fixed length lines,
  17. >> or consider a database consisting of variant text records in fixed fields.
  18. >> In either case, the amount of data per field is now variant on Runic
  19. >> encoding.  For instance, if we accept the Plan-9 soloution, an application
  20. >> used in both England and the US will vary as to how much data is
  21. >> representable per fixed field based on whether or not that data contains
  22. >> the English "#" character.  This gets worse the further you get from base
  23. >> ASCII coding.
  24. >
  25. >Using Plan 9 utf you know the maximum size in bytes that a Rune can
  26. >be encoded into.  Fixed fields only have to be a multiple of this value,
  27. >defined to be to be UTFmax.  So where's the problem?
  28.  
  29. [ First a clarification of something which is my fault because of my
  30.   background in comm software:  I have been informed that the currently
  31.   "blessed" correct terminlogy for what I have been calling "Runic
  32.   encoding" is "Process code", "File code", or "Interchange code".  I'll
  33.   try to call it "Interchange code" from now on (I feel the other terms
  34.   imply applications, some of which I disagree with). ]
  35.  
  36. A good question.  The answer is fourfold:
  37.  
  38. 1)    The field length is still not descriptive of the number of
  39.     characters a field may contain; you have only set a minimum
  40.     "maximum character count".  It is still possible to enter
  41.     in more characters in a non-maximally encoded character set
  42.     than this value, unless you adopt the abstraction of a
  43.     maximum character count seperate from the maximum necessary
  44.     storage length.  The maximum character count is what we
  45.     would normally think of as the displayed field length (ie:
  46.     what you see as the size of an input box).  If my field
  47.     length is 6 bytes times the maximum record length for 31
  48.     bits (as with UTF encoding), would I not be better off using
  49.     raw 32 bit encoding, yielding only 4 times the maximum
  50.     record length for the same data (or only 2 times for 16 bit
  51.     data)?
  52.  
  53. 2)    A database application with memory mapped I/O for both the
  54.     front and back ends can not keep a consistant coding for
  55.     data throughout the application.  If I memory map a UTF
  56.     file, conversion is required before searches.  This will
  57.     either have to be done at search time, or will have to be
  58.     done via non-UTF encoded cache buffers within each database
  59.     engine (there may be several for a single database).  This
  60.     is wasteful of user-space memory and requires additional
  61.     swapping of pages for the user-space cache implementation.
  62.     Further, UTF encoded data must be converted into some
  63.     native representation before it can be written to display
  64.     memory if memory mapped output is used.
  65.  
  66. 3)    If UTF is used for internal encoding in the application,
  67.     (such as would be necessary for direct use of memory mapped
  68.     files), then you have a dilemma: the natural input mechanism
  69.     into such a system is also UTF encoded data.  This means that
  70.     either the device must directly supply UTF encoded data (a
  71.     problem, in that the reson the memory-mapped files are UTF in
  72.     user space is our reluctance to do translation to and from
  73.     UTF within the kernel), or each application must carry around
  74.     it's own raw-input-to-UTF-conversion code.  This enlareges the
  75.     size of the application.  Note that this conversion code is
  76.     not "already there" if the native processing mode for an
  77.     application is UTF, since other conversions would not take
  78.     place.
  79.  
  80. 4)    Backward comatability with existing systems requires the ability
  81.     to crossmount using existing mechanisms (NFS, RFS, etc.).  How
  82.     can this be supported without kernel code, when the remote
  83.     system is ignorant of UTF deencoding?  With kernel code, what
  84.     is the purpose in using the UTF encoding as the native processing
  85.     mode in the application?
  86.  
  87. There are workarounds to these, but they are much uglier than compact
  88. storage processing, where storage is done in a locale-specific set if
  89. possible.  This would also allow a business to convert relatively
  90. painlessly by leveraging current investments in prior localization
  91. technology.
  92.  
  93.  
  94.                     Terry Lambert
  95.                     terry@icarus.weber.edu
  96.                     terry_lambert@novell.com
  97. ---
  98. Any opinions in this posting are my own and not those of my present
  99. or previous employers.
  100. -- 
  101. -------------------------------------------------------------------------------
  102.                                         "I have an 8 user poetic license" - me
  103.  Get the 386bsd FAQ from agate.berkeley.edu:/pub/386BSD/386bsd-0.1/unofficial
  104. -------------------------------------------------------------------------------
  105.