[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] IBM z/OS + EBCDIC support
From: |
Daniel Richard G. |
Subject: |
Re: [PATCH] IBM z/OS + EBCDIC support |
Date: |
Wed, 23 Sep 2015 17:57:07 -0400 |
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. || address@hidden
My ASCII-art .sig got a bad case of Times New Roman.
- Re: [PATCH] IBM z/OS + EBCDIC support, (continued)
- Re: [PATCH] IBM z/OS + EBCDIC support, Paul Eggert, 2015/09/22
- Re: [PATCH] IBM z/OS + EBCDIC support, Paul Eggert, 2015/09/22
- Re: [PATCH] IBM z/OS + EBCDIC support, Daniel Richard G., 2015/09/22
- Re: [PATCH] IBM z/OS + EBCDIC support, Paul Eggert, 2015/09/22
- Re: [PATCH] IBM z/OS + EBCDIC support, Daniel Richard G., 2015/09/22
- Re: [PATCH] IBM z/OS + EBCDIC support, Paul Eggert, 2015/09/22
- Re: [PATCH] IBM z/OS + EBCDIC support, Daniel Richard G., 2015/09/23
- Re: [PATCH] IBM z/OS + EBCDIC support, Paul Eggert, 2015/09/23
- Re: [PATCH] IBM z/OS + EBCDIC support, Paul Eggert, 2015/09/23
- Re: [PATCH] IBM z/OS + EBCDIC support,
Daniel Richard G. <=
- Re: [PATCH] IBM z/OS + EBCDIC support, Paul Eggert, 2015/09/25
- Re: [PATCH] IBM z/OS + EBCDIC support, Daniel Richard G., 2015/09/25
- Re: [PATCH] IBM z/OS + EBCDIC support, Paul Eggert, 2015/09/25
- Re: [PATCH] IBM z/OS + EBCDIC support, Daniel Richard G., 2015/09/26
- Re: [PATCH] IBM z/OS + EBCDIC support, Ben Pfaff, 2015/09/26
- Re: [PATCH] IBM z/OS + EBCDIC support, Daniel Richard G., 2015/09/27
- Re: [PATCH] IBM z/OS + EBCDIC support, Paul Eggert, 2015/09/27
- Re: [PATCH] IBM z/OS + EBCDIC support, Daniel Richard G., 2015/09/27
Re: [PATCH] IBM z/OS + EBCDIC support, Paul Eggert, 2015/09/22