Multi-byte chars

  • Thread starter Bill Cunningham
  • Start date
D

Dan Pop

I've already said that an implementation is not allowed to use mbtowc
for that purpose.

Then, what *exactly* was your point when you talked about implementing
printf with portable code in C89?
As said repeatedly C89's support for the extended
character set was not enough.

Which is hardly an excuse for the broken requirement that 'a' == L'a'
instead of providing a function converting characters to wide characters.

Dan
 
J

Jun Woong

Dan Pop said:
Then, what *exactly* was your point when you talked about implementing
printf with portable code in C89?

I've already said what I meant in some of my previous postings. To
answer this question makes the same discussion get started again.
Which is hardly an excuse for the broken requirement that 'a' == L'a'
instead of providing a function converting characters to wide characters.

The historical process for C89 can be an excuse, though I don't think
the requirement broken, considering that it didn't make any
*practical* problem at that time and that there was no objection
against it among the committee members.
 
D

Dan Pop

I've already said what I meant in some of my previous postings. To
answer this question makes the same discussion get started again.

Your *attempt* to answer was too incoherent to be comprehensible.
The historical process for C89 can be an excuse,

Nope, it cannot. Either the committee wanted to add *working* support for
wide characters, in which case they should have done the right thing, or
they didn't, in which case they shouldn't have put wide characters at all
in the C standard.
though I don't think
the requirement broken, considering that it didn't make any
*practical* problem at that time

How do you know how many implementors have been inconvenienced by that
requirement?
and that there was no objection against it among the committee members.

Which proves exactly zilch: if none of them was *really* interested in
a proper solution, why would you expect any objections?

Dan
 
D

Dave Thompson

And consecutive, which is actually a stronger requirement.
That is a restriction on the character set. It also happens to be a
very desirable characteristic of a coded character set; so desirable
that no one has ever reported meeting one that doesn't have it.
It's desirable, as are consecutive or at least ascending letters, only
for machine processing of the data represented therein, which was not
the purpose (or application) of many character codes. In fact, until
the rise of electronic digital computers, I believe pretty much the
only code for even limited processing (rather than transmission or
storage) of data was Hollerith card (which survives almost unchanged
as a subset of EBCDIC).

Important examples of nonconsecutive digit codes:

International Alphabet 2 aka "Baudot" code, 5-bits with 2 shift states
(letters and figures); the digits were the FIGS-shift of the top
letter row of the (US standard) keyboard QWERTYUIOP, which wouldn't
have been consecutive even if letter codes had been, which they
weren't: much like the telegraph and later radio "Morse" code, they
were originally designed to use fewest "mark" bits for the commonest
letters to reduce power usage over long wires. Used AIUI by Teletype
models prior to 33 (the first IA5/ASCII model), and in the Telex
public switched network into the '80s at least, even though probably
few if any of the terminals were still Teletypes, and many were
computers and not really terminals at all.

I think I still have some software containing Baudot/ASCII tables --
stored somewhere among a bunch of files in a now-unsupported format
written on 9-track magtape, if you can read that :)

TeleTypeSetter or TTS, 6-bits, 2-shift but digits had their own codes
i.e. corresponding approximately to the 2 shifts of a 4-row typewriter
keyboard including both upper and lower case letters. Originally used
to operate Linotype machines in duplicate or remotely, used at least
into the '70s in a variety of pre-press equipment. Also chose fewest
'1' bits for commonest codes, but I think by this time the motivation
was more to reduce average punch wear.

I'm pretty sure Frieden Flexowriter, a classic typewriter mechanism
(i.e. typebar basket and platen on moving carriage) modified into a
computer terminal, used a code that did not have consecutive digits,
but I didn't spend much time looking at its tapes and don't remember.

Although none of these was ever used, and I don't think would even
have been considered, as the internal code for a computer, and thus
irrelevant to the design of C or any other programming language.

- David.Thompson1 at worldnet.att.net
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,075
Messages
2,570,564
Members
47,200
Latest member
Vanessa98N

Latest Threads

Top