From: "Daniel Richard G." <skunk@iSKUNK.ORG>
To: Paul Eggert <eggert@cs.ucla.edu>, bug-gnulib@gnu.org
Subject: Re: [PATCH] IBM z/OS + EBCDIC support
Date: Wed, 23 Sep 2015 17:57:07 -0400 [thread overview]
Message-ID: <1443045427.1143468.391911505.079258F5@webmail.messagingengine.com> (raw)
In-Reply-To: <5602FD95.9000707@cs.ucla.edu>
Hi Paul,
I tested your changes in git a406de9c. A handful of fixes are needed:
* c_isascii(): Add \x07 (DEL) as an ASCII character.
* c_isascii(): Drop \xFF (EO), as this is not ASCII.
* c_iscntrl(): Add \x07 (DEL) as a control character.
* c_iscntrl(): Drop \xFF (EO), as apparently this is not a control
character.
* c_tolower(): In order to agree with tolower(), it needs to return the
_unsigned_ promoted form of the character. (Returning identity in the
default: case seems fine.)
* c_toupper(): Likewise.
* test-c-ctype.c: test_all(): As a result of the preceding two changes,
this is needed:
- ASSERT (c_tolower (c) == 'a');
+ ASSERT (to_char (c_tolower (c)) == 'a');
- ASSERT (c_toupper (c) == 'A');
+ ASSERT (to_char (c_toupper (c)) == 'A');
Signed characters are a real PITA in EBCDIC. Even something like
wchar_t buf[] = { 'a', 'b', 'c', '\0' };
doesn't work properly in that case.
--Daniel
On Wed, 2015 Sep 23 12:29-0700, Paul Eggert wrote:
> On 09/22/2015 11:58 PM, Daniel Richard G. wrote:
> >
> > What about having a check in test-c-ctype that compares c_iscntrl()
> > with its system counterpart? If the assumption is that alternate
> > EBCDIC encodings used with Gnulib will agree with EBCDIC-1047 on
> > these characters, then that should be checked.
>
> Good idea. Done in the attached patch.
--
Daniel Richard G. || skunk@iSKUNK.ORG
My ASCII-art .sig got a bad case of Times New Roman.
next prev parent reply other threads:[~2015-09-23 21:57 UTC|newest]
Thread overview: 49+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-22 2:28 [PATCH] IBM z/OS + EBCDIC support Daniel Richard G.
2015-09-22 15:23 ` Eric Blake
2015-09-22 19:27 ` Daniel Richard G.
2015-09-22 20:00 ` Paul Eggert
2015-09-22 20:08 ` Eric Blake
2015-09-22 20:51 ` Daniel Richard G.
2015-09-22 19:32 ` Paul Eggert
2015-09-22 19:46 ` Paul Eggert
2015-09-22 20:37 ` Daniel Richard G.
2015-09-22 22:03 ` Paul Eggert
2015-09-22 23:44 ` Daniel Richard G.
2015-09-23 2:02 ` Paul Eggert
2015-09-23 6:58 ` Daniel Richard G.
2015-09-23 19:05 ` Paul Eggert
2015-09-23 19:29 ` Paul Eggert
2015-09-23 21:57 ` Daniel Richard G. [this message]
2015-09-25 7:29 ` Paul Eggert
2015-09-26 0:25 ` Daniel Richard G.
2015-09-26 2:49 ` Paul Eggert
2015-09-26 4:39 ` Daniel Richard G.
2015-09-26 16:08 ` Ben Pfaff
2015-09-27 6:31 ` Daniel Richard G.
2015-09-27 6:59 ` Paul Eggert
2015-09-28 2:09 ` Daniel Richard G.
2015-10-15 4:49 ` Daniel Richard G.
2016-08-18 0:47 ` Paul Eggert
2016-08-18 8:24 ` Daniel Richard G.
2016-08-18 8:53 ` Paul Eggert
2016-08-19 8:20 ` Daniel Richard G.
2016-08-19 11:03 ` Bruno Haible
2016-08-19 19:28 ` Paul Eggert
2016-08-19 20:38 ` Daniel Richard G.
2019-12-19 4:57 ` z/OS configure triple Bruno Haible
2019-12-20 0:22 ` Daniel Richard G.
2019-12-20 6:29 ` Bruno Haible
2019-12-19 5:16 ` z/OS, iconv, and charset aliases Bruno Haible
2019-12-19 5:21 ` Bruno Haible
2019-12-20 4:38 ` Daniel Richard G.
2019-12-20 8:19 ` Bruno Haible
2019-12-20 18:23 ` Daniel Richard G.
2019-12-21 5:49 ` z/OS, iconv, and gperf Bruno Haible
2020-01-09 5:48 ` Daniel Richard G.
2020-01-19 21:52 ` Bruno Haible
2020-01-19 21:59 ` Bruno Haible
2020-01-19 22:32 ` Daniel Richard G.
2020-01-20 0:13 ` Bruno Haible
2020-01-22 6:38 ` Daniel Richard G.
2015-09-22 19:50 ` [PATCH] IBM z/OS + EBCDIC support Paul Eggert
2015-09-22 20:47 ` Daniel Richard G.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://lists.gnu.org/mailman/listinfo/bug-gnulib
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1443045427.1143468.391911505.079258F5@webmail.messagingengine.com \
--to=skunk@iskunk.org \
--cc=bug-gnulib@gnu.org \
--cc=eggert@cs.ucla.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).