home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / std / unix / 395 < prev    next >
Encoding:
Internet Message Format  |  1992-08-18  |  4.0 KB

  1. Path: sparky!uunet!uunet!not-for-mail
  2. From: gwyn@smoke.brl.mil (Doug Gwyn)
  3. Newsgroups: comp.std.unix
  4. Subject: Re: POSIX update
  5. Date: 19 Aug 1992 12:59:15 -0700
  6. Organization: U.S. Army Ballistic Research Laboratory, APG, MD.
  7. Lines: 61
  8. Sender: sef@ftp.UU.NET
  9. Approved: sef@ftp.uucp (Moderator, Sean Eric Fagan)
  10. Message-ID: <16u96jINNlej@ftp.UU.NET>
  11. References: <16b9drINNero@ftp.UU.NET> <16ccqfINNrss@ftp.UU.NET> <16h5a2INNko4@ftp.UU.NET>
  12. NNTP-Posting-Host: ftp.uu.net
  13. X-Submissions: std-unix@uunet.uu.net
  14.  
  15. Submitted-by: gwyn@smoke.brl.mil (Doug Gwyn)
  16.  
  17. In article <16h5a2INNko4@ftp.UU.NET> peterw@spaten.sharebase.com (Peter Wisnovsky) writes:
  18. >... my impression of what the potential problem is that if the standards
  19. >orgs went ahead and used wchar_t as the vehicle for supporting Unicode,
  20. >then existing conformant implementations that define wchar_t to be an
  21. >8-bit or 32-bit value would be made non-conformant. NT is not
  22. >non-conformant in itself...but the solution it proposes to the storage
  23. >of Unicode data, that is, the fixing of the size of wchar_t to be
  24. >16=bits wide, would not work with existing conformant systems.
  25.  
  26. This represents a misunderstanding of the role of standards and of wchar_t
  27. in particular.  The C standard requires that a conforming implementation
  28. define a wchar_t type for the internal representation of whatever
  29. multibyte character sequences it chooses to support; however, it does not
  30. mandate that any particular multibyte encoding be supported.  A vendor may
  31. conform to the C standard while not supporting Unicode, for example.  It
  32. is left as an implementation "marketing decision" just how extensive the
  33. multibyte support will be.  Certainly, an implementation that chose to
  34. ignore genuine extended character sets and define wchar_t as an 8-bit
  35. type will not be able to at the same time support 16-bit Unicode.  If and
  36. when such implementations are revised to properly support extended
  37. character sets, they will have to make wchar_t at least 16 bits, as most
  38. international implementations of Standard C already do.  Since wchar_t is
  39. an internal data type it is not really relevant to issues of data
  40. interchange among different systems; that does not lie within the scope
  41. of the programming language standard.
  42.  
  43. >Two proposals were discussed at the Unicode conference wrt XPG. One
  44. >would be to have the standards changed so that wchar_t would be
  45. >defined to be 16-bits wide; the other would be to create a new
  46. >datatype, `unichar'. The sentiment at the conference was to create a
  47. >new datatype.
  48.  
  49. If that accurately reflects the discussion, then it merely serves to
  50. confirm the widespread impression that the Unicode proponents don't
  51. understand the existing standards nor the magnitude of the effects of
  52. addition of new data types to existing languages.  It is already an
  53. easy matter to, for purposes of conformance with other standards, add
  54. non-conflicting requirements (such as at least 16 bits in wchar_t)
  55. beyond base standards.  For example, POSIX.1 adds library requirements
  56. beyond those specified in the C standard.  There is no need to "change"
  57. the base standards in such cases.
  58.  
  59. Standard C's multibyte character support was designed in close
  60. consultation with many individuals and organizations who had long been
  61. involved in "internationalization" issues.  ITSCJ particularly comes
  62. to mind, and they have continued to work on improvements within the C
  63. multibyte character model.  Originally they too suggested a separate
  64. data type for "long" character encodings, and I proposed an alternate
  65. suggestion that also introduced a new data type (my type would have
  66. been used for sub-character bytes, however, reserving "char" for the
  67. sole character type, thus immensely simplifying programming).  After
  68. considerable debate and several committee and working subgroup meetings,
  69. consensus was reached on the multibyte external sequence/wchar_t
  70. internal encoding approach.  It would behoove the Unicode proponents to
  71. fully understand those deliberations and the resulting design before
  72. they further bollix up the works.
  73.  
  74.  
  75. Volume-Number: Volume 29, Number 7
  76.