From -4495747990973192296
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,b1fa62568eb1d2a7
X-Google-Attributes: gidf78e5,public
X-Google-ArrivalTime: 2002-02-03 10:59:01 PST
Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.tele.dk!small.news.tele.dk!212.74.64.35!colt.net!dispose.news.demon.net!news.demon.co.uk!demon!mail2news.demon.co.uk!not-for-mail
From: remove.haberg@matematik.su.se (Hans Aberg)
Newsgroups: comp.std.c++
Subject: Re: Unicode vs. Char
Date: Sun,  3 Feb 2002 18:58:20 GMT
Organization: Mathematics
Approved: Fergus Henderson <fjh@cs.mu.oz.au>, moderator of comp.std.c++
Message-ID: <remove.haberg-0302021254480001@du128-226.ppp.su-anst.tninet.se>
References: <OEZ48.66846$h31.3769928@e420r-atl1.usenetserver.com> <remove.haberg-2801021229390001@du135-226.ppp.su-anst.tninet.se> <0hU68.89357$h31.5940930@e420r-atl1.usenetserver.com>
X-Trace: mail2news.demon.co.uk 1012762705 mail2news:9950 mail2news mail2news.demon.co.uk
X-Complaints-To: abuse@demon.net
X-Mail2News-Path: news.demon.net!mulga.cs.mu.oz.au
X-Authentication-Warning: mulga.cs.mu.OZ.AU: fjh set sender to devnull@stump.algebra.com using -f
X-Robomod: STUMP, ichudov@algebra.com (Igor Chudov)
NNTP-Posting-Date: Sun, 3 Feb 2002 11:55:11 +0000 (UTC)
Lines: 62
Xref: archiver1.google.com comp.std.c++:9369

In article <0hU68.89357$h31.5940930@e420r-atl1.usenetserver.com>, "Early
Ehlinger" <earlye@yahoo.com> wrote:
>I think specifically requesting Unicode would probably be a mistake.
>Consider how bad a choice it would have been for the Standard to require
>that std::string have a refcounted implementation.  It was quite wise to
>write the Standard to allow refcounted std::string, while not requiring it.

The difference is that Unicode is a well established standard, and ref
counts could be replaced by another type of conservative GC in order to
keep track of references.

Or one may view Unicode as a part of the distributed programming package
(see first article in thread "C++0x" last year): It turns out that the
current C++ Unicode support isn't portable, so that programmers that need
that feature end up writing out the names of the characters and their
Unicode values. This is extremely tedious, especially now when Unicode may
have hundreds of thousands of characters.

>Consider what happens if the Standard requires Unicode and then it turns out
>that the Unicode design is fundamentally flawed. Or what if another
>international character encoding comes into favor, and C++ is tied to
>Unicode?

Use wchar_t/char for that. As years go by, and one sees the usefulness of
them, one may add the to the C++ standard in another revision (if C++
still exists at that time).

Otherwise, everybody expects Unicode is created by a consortium trying to
make all other characters encodings unnecessary. There is room for
introducing user characters on top of the Unicode range (between 2^21 and
2^24-1 I think). So if you have Unicode, and what for what reason would
you use another character encoding when communicating with people?
(Disregarding the fact that it might be useful with special compacted
encodings for special purposes -- but that would not be used in order to
guarantee open communications.)


>> One model that comes to my mind in order to resolve this problem is to
>> number all bits in the computer (instead of words), and specify the
>> representation with respect to that. In this model, the high/low endian
>> representations are two different encodings in this binary model.
>
>Eek.  As convenient as this might be, it would also be terribly inefficient
>as the basis for memory management.

Only if one tries to access those bits, but that is the same case as now:
Such a model would of course include an entity "machine word", and
computers would generally use that. One just refers to the it model when
necessary in order to resolve the binary structure. It does not mean that
one has to convert to the bit model, if that is not necessary.

  Hans Aberg      * Anti-spam: remove "remove." from email address.
                  * Email: Hans Aberg <remove.haberg@member.ams.org>
                  * Home Page: <http://www.matematik.su.se/~haberg/>
                  * AMS member listing: <http://www.ams.org/cml/>

---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.research.att.com/~austern/csc/faq.html                ]



