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


Groups > comp.lang.c > #103330

Re: The C Library Reference Guide

From Jerry Stuckle <jstucklex@attglobal.net>
Newsgroups comp.lang.c
Subject Re: The C Library Reference Guide
Date 2017-02-06 11:47 -0500
Organization A noiseless patient Spider
Message-ID <o7a97a$jmu$1@jstuckle.eternal-september.org> (permalink)
References <o79hm0$svn$1@dont-email.me> <589862a6.6370671@news.xs4all.nl> <65026461-822c-489d-bedc-3bae9787b895@googlegroups.com> <o7a61j$6ou$1@jstuckle.eternal-september.org> <9461384e-1356-4e03-a7f8-ab252c216032@googlegroups.com>

Show all headers | View raw


On 2/6/2017 11:32 AM, supercat@casperkitty.com wrote:
> On Monday, February 6, 2017 at 9:53:09 AM UTC-6, Jerry Stuckle wrote:
>>> How many C99 or C11 implementations are there in which character codes 0-127
>>> represent anything other than ASCII?  I've used target systems which had
>>> non-ASCII character sets, and it would be handy if there were a C syntax to
>>> create string literals by feeding source text through a mapping table, but
>>> I'd be genuinely surprised if there have been any full C99 or C11
>>> implementations using EBCDIC or any other source character set.
>>>
>>
>> Every one which runs on IBM-compatible mainframes uses EBCDIC.
> 
> Does IBM continue to treat EBCDIC as its preferred character set in new
> designs?  When I did some programming on the RS/6000 in 1991, that was
> ASCII, and I would think that any system that's going to be connected to
> the Internet would benefit greatly from using ASCII as its primary
> character set.
>

RS/6000 was not a mainframe.  It was a minicomputer.  And yes,
mainframes still use EBCDIC.

> Further, it would seem that if the language is going to support character
> sets other than ASCII,  the way to do that would be to have a syntax to
> define character-translation tables for use with string literals and
> designate which one should be used either with individual literals or as
> a default.  That would make it possible to write code which expressed both
> ASCII and EBCDIC literals in human-readable form [e.g. if no implementations
> presently use \[ for anything:
> 
>     FILE *f1 = fopen("/dev/deviceThatUsesASCII", "wb");
>     FILE *f2 = fopen("/dev/deviceThatUsesEBCDIC", "wb");
>     fprintf(f1, "%s", "\[ASCII]Hello");  // Send 0x48 0x65 0x6C 0x6C 0x6F
>     fprintf(f2, "%s", "\[EBCDIC]Hello"); // Send 0xC8 0x85 0x93 0x93 0x06
> 
> Something like printf would likely be a bother (any code which changed
> the default character set would have to ensure a suitable printf function
> was used) but there are some situations where a string literal should
> represent a sequence of ASCII values *regardless of the source character
> set*, some where it should represent the source character set, and probably
> some where it should represent EBCDIC.
> 

Whatever.

-- 
==================
Remove the "x" from my email address
Jerry Stuckle
jstucklex@attglobal.net
==================

Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

The C Library Reference Guide MehdiAmini <atorrses@gmail.com> - 2017-02-06 13:35 +0330
  Re: The C Library Reference Guide Barry Schwarz <schwarzb@dqel.com> - 2017-02-06 03:42 -0800
  Re: The C Library Reference Guide raltbos@xs4all.nl (Richard Bos) - 2017-02-06 11:56 +0000
    Re: The C Library Reference Guide supercat@casperkitty.com - 2017-02-06 06:33 -0800
      Re: The C Library Reference Guide raltbos@xs4all.nl (Richard Bos) - 2017-02-06 15:17 +0000
      Re: The C Library Reference Guide Jerry Stuckle <jstucklex@attglobal.net> - 2017-02-06 10:53 -0500
        Re: The C Library Reference Guide supercat@casperkitty.com - 2017-02-06 08:32 -0800
          Re: The C Library Reference Guide Jerry Stuckle <jstucklex@attglobal.net> - 2017-02-06 11:47 -0500
          Re: The C Library Reference Guide Malcolm McLean <malcolm.mclean5@btinternet.com> - 2017-02-06 09:01 -0800
          Re: The C Library Reference Guide Barry Schwarz <schwarzb@dqel.com> - 2017-02-06 11:26 -0800
        Re: The C Library Reference Guide Robert Wessel <robertwessel2@yahoo.com> - 2017-02-06 16:26 -0600
      Re: The C Library Reference Guide Ben Bacarisse <ben.usenet@bsb.me.uk> - 2017-02-06 17:01 +0000
        Re: The C Library Reference Guide supercat@casperkitty.com - 2017-02-06 09:45 -0800
          Re: The C Library Reference Guide Ben Bacarisse <ben.usenet@bsb.me.uk> - 2017-02-06 18:03 +0000
            Re: The C Library Reference Guide supercat@casperkitty.com - 2017-02-06 10:45 -0800
            Re: The C Library Reference Guide Tim Rentsch <txr@alumni.caltech.edu> - 2017-02-09 07:58 -0800
          Re: The C Library Reference Guide raltbos@xs4all.nl (Richard Bos) - 2017-02-06 20:43 +0000
            Re: The C Library Reference Guide supercat@casperkitty.com - 2017-02-06 13:22 -0800
              Re: The C Library Reference Guide raltbos@xs4all.nl (Richard Bos) - 2017-02-06 22:17 +0000
    Re: The C Library Reference Guide Noob <root@127.0.0.1> - 2017-02-06 16:15 +0100
    Re: The C Library Reference Guide luser droog <luser.droog@gmail.com> - 2017-02-06 10:34 -0800
    Re: The C Library Reference Guide Tim Rentsch <txr@alumni.caltech.edu> - 2017-02-08 22:14 -0800
      Re: The C Library Reference Guide Keith Thompson <kst-u@mib.org> - 2017-02-09 09:32 -0800

csiph-web