home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / std_unix / volume.29 / text0006.txt < prev    next >
Encoding:
Text File  |  1992-12-26  |  3.5 KB  |  63 lines

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