Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #25813

Re: Why No Supplemental Characters In Character Literals?

Date 2011-02-04 19:56 -0500
From Arne Vajhøj <arne@vajhoej.dk>
Newsgroups comp.lang.java.programmer
Subject Re: Why No Supplemental Characters In Character Literals?
References (2 earlier) <iig84e$uqu$1@lust.ihug.co.nz> <iigcva$90q$1@news.eternal-september.org> <iihufd$ulm$1@lust.ihug.co.nz> <iii493$nn8$1@news.eternal-september.org> <iii64u$nji$1@news.eternal-september.org>
Message-ID <4d4ca055$0$23765$14726298@news.sunsite.dk> (permalink)
Organization SunSITE.dk - Supporting Open source

Show all headers | View raw


On 04-02-2011 19:37, Mike Schilling wrote:
> "Joshua Cranmer" <Pidgeot18@verizon.invalid> wrote in message
> news:iii493$nn8$1@news.eternal-september.org...
>> On 02/04/2011 05:26 PM, Lawrence D'Oliveiro wrote:
>>> In message<iigcva$90q$1@news.eternal-september.org>, Mike Schilling
>>> wrote:
>>>
>>>> Yes, it does (contain 16 bits.)
>>>
>>> Yeah, I didn’t realize it was spelled out that way in the original
>>> language
>>> spec. What a short-sighted decision.
>>
>> It would have been stupider to have not specified a guaranteed size
>> for char. Take C (+ POSIX), where the definitions of sizes are very
>> loosely defined, and you very quickly get non-portable code. Yes, you
>> can in theory change the size of, say, time_t independently of other
>> types, but it doesn't do you much good if half the C code assumes
>> sizeof(time_t) == sizeof(int). Pinning down the sizes of the types was
>> a _very good_ move on Java's part.
>>
>>> Why was there a need to define the size of a character at all? Even
>>> in the
>>> early days of the unification of Unicode and ISO-10646, there was
>>> already
>>> provision for UCS-4. Did they really think that could safely be ignored?
>>
>> Knowing the results of other properly Unicode-aware code in the first
>> days of Unicode, I believe that Unicode quite heavily gave an
>> impression of "Unicode == 16 bit". Java is not the only major platform
>> to be bitten by now-Unicode-is-32-bits... the Windows platform has
>> 16-bit characters embedded into it.
>
> .NET, which in several cases took advantage of following Java to correct
> some of its mistakes (e.g. signed bytes), didn’t fix this one.

Which is a bit surprising since high code points were introduced
when .NET came around.

But they probably had a compatibility issue with p/Invoke and
Win32 API, COM interop, C++ mixed mode etc. that all had
to work with existing Win32 model of 16 bit wchars.

Arne

Back to comp.lang.java.programmer | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Re: Why No Supplemental Characters In Character Literals? Lawrence D'Oliveiro <ldo@geek-central.gen.new_zealand> - 2011-02-04 19:59 +1300
  Re: Why No Supplemental Characters In Character Literals? "Mike Schilling" <mscottschilling@hotmail.com> - 2011-02-04 17:02 -0800
    Re: Why No Supplemental Characters In Character Literals? Ken Wesson <kwesson@gmail.com> - 2011-02-05 04:21 +0100
  Re: Why No Supplemental Characters In Character Literals? Joshua Cranmer <Pidgeot18@verizon.invalid> - 2011-02-04 19:05 -0500
    Re: Why No Supplemental Characters In Character Literals? Arne Vajhøj <arne@vajhoej.dk> - 2011-02-04 19:56 -0500
    Re: Why No Supplemental Characters In Character Literals? "Mike Schilling" <mscottschilling@hotmail.com> - 2011-02-04 16:37 -0800
  Re: Why No Supplemental Characters In Character Literals? "Mike Schilling" <mscottschilling@hotmail.com> - 2011-02-04 00:22 -0800
    Re: Why No Supplemental Characters In Character Literals? Roedy Green <see_website@mindprod.com.invalid> - 2011-02-04 15:03 -0800
    Re: Why No Supplemental Characters In Character Literals? Arne Vajhøj <arne@vajhoej.dk> - 2011-02-04 18:04 -0500
    Re: Why No Supplemental Characters In Character Literals? Lew <noone@lewscanon.com> - 2011-02-04 07:49 -0500
    Re: Why No Supplemental Characters In Character Literals? Lawrence D'Oliveiro <ldo@geek-central.gen.new_zealand> - 2011-02-05 11:26 +1300
  Re: Efficient unicode string implementation was: Re: Why No Supplemental Characters In Character Literals? Joshua Cranmer <Pidgeot18@verizon.invalid> - 2011-02-04 19:13 -0500
    Re: Efficient unicode string implementation was: Re: Why No Supplemental Characters In Character Literals? Arne Vajhøj <arne@vajhoej.dk> - 2011-02-04 20:08 -0500
  Re: Why No Supplemental Characters In Character Literals? Daniele Futtorovic <da.futt.news@laposte.net.invalid> - 2011-02-04 18:37 +0100
    Re: Why No Supplemental Characters In Character Literals? markspace <nospam@nowhere.com> - 2011-02-04 11:27 -0800
  Re: Efficient unicode string implementation was: Re: Why No Supplemental Characters In Character Literals? Joshua Cranmer <Pidgeot18@verizon.invalid> - 2011-02-04 17:28 -0500
  Re: Why No Supplemental Characters In Character Literals? "Mike Schilling" <mscottschilling@hotmail.com> - 2011-02-04 09:10 -0800
    Re: Efficient unicode string implementation was: Re: Why No Supplemental Characters In Character Literals? Roedy Green <see_website@mindprod.com.invalid> - 2011-02-04 15:22 -0800
      Re: Efficient unicode string implementation was: Re: Why No Supplemental Characters In Character Literals? Arne Vajhøj <arne@vajhoej.dk> - 2011-02-04 18:41 -0500
    Re: Why No Supplemental Characters In Character Literals? Arne Vajhøj <arne@vajhoej.dk> - 2011-02-04 18:12 -0500
    Efficient unicode string implementation was: Re: Why No Supplemental Characters In Character Literals? Tom Anderson <twic@urchin.earth.li> - 2011-02-04 21:30 +0000
      Re: Efficient unicode string implementation was: Re: Why No Supplemental Characters In Character Literals? Ken Wesson <kwesson@gmail.com> - 2011-02-05 04:25 +0100
    Re: Why No Supplemental Characters In Character Literals? Arne Vajhøj <arne@vajhoej.dk> - 2011-02-04 12:33 -0500
    Re: Why No Supplemental Characters In Character Literals? Joshua Cranmer <Pidgeot18@verizon.invalid> - 2011-02-04 13:44 -0500
      Re: Why No Supplemental Characters In Character Literals? Roedy Green <see_website@mindprod.com.invalid> - 2011-02-04 15:08 -0800
  Re: Why No Supplemental Characters In Character Literals? Lew <lew@lewscanon.com> - 2011-02-04 12:43 -0800
  Re: Why No Supplemental Characters In Character Literals? Arne Vajhøj <arne@vajhoej.dk> - 2011-02-04 10:49 -0500
  Re: Why No Supplemental Characters In Character Literals? Joshua Cranmer <Pidgeot18@verizon.invalid> - 2011-02-04 08:04 -0500

csiph-web