From: owens on
>
>
>
>---- Original Message ----
>From: jgmb65(a)rezozer.net
>To: debian-user(a)lists.debian.org
>Subject: RE: non-ASCII environment
>Date: Sat, 10 Apr 2010 00:14:14 +0800
>
>>Hello List,
>>
>>I am writing some C code which involves ASCII characters:
>>in C related books, we can find a lot of comments about
>>ASCII character issues, as far as we are concern with portability.
>>
>>Nevertheless, something bothers me: where non-ASCII environment can
>be found ?
>>
>>Furthermore, can such an environment be created on a Debian box ?
>>The aim is to check the portability of my code.
>>
>>Thanks in advance,
>>Jerome
>>
>>
>>
>>--
>>Jerome BENOIT
>>jgmbenoit-at+rezozer*dot_net
>>
>>
>>--
>>To UNSUBSCRIBE, email to debian-user-REQUEST(a)lists.debian.org
>>with a subject of "unsubscribe". Trouble? Contact
>listmaster(a)lists.debian.org
>>Archive: http://lists.debian.org/4BBF5256.40104(a)rezozer.net
>>
Usually the "correct" answer is to stick to the ANSI standard and all
will be well. However if you have some specific issue or some
specific questionable code, why not post it?
Larry
>>



--
To UNSUBSCRIBE, email to debian-user-REQUEST(a)lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster(a)lists.debian.org
Archive: http://lists.debian.org/380-22010459204526234(a)netptc.net
From: John Hasler on
Stephen Powell writes:
> Yes, Hercules is an IBM mainframe emulator. But the problem is
> licensing. There are some *very old* releases of IBM operating
> systems that have passed into the public domain that you can run on
> the Hercules emulator.

Which should suffice for testing his software with EBCDIC.

> These are circa 1975 or so, which is about 35 years ago. An example
> is VM/SP Release 6. The problem is that those operating systems don't
> have a C compiler or a POSIX interface.

Are there any copies of MTS (Michigan Terminal System) around? It would
be in the public domain and I know it had a C compiler: I used it to
teach myself C.

My wife would love to have MTS back again (of course, she'd insist on a
full set of printed manuals...)
--
John Hasler


--
To UNSUBSCRIBE, email to debian-user-REQUEST(a)lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster(a)lists.debian.org
Archive: http://lists.debian.org/87tyrkcmrz.fsf(a)thumper.dhh.gt.org
From: Nuno Magalhães on
I don't think the OP meant mainfraimes...

I'd stick with ANSI/ISO C plus UTF-8, there are random examples and
stuff on the net. If you can, post your findings, i'd be curious
(living on the nonASCII part of the world) for general guidelines,
do's and don't's.

--
() ascii-rubanda kampajno - kontraŭ html-a retpoŝto
/\ ascii ribbon campaign - against html e-mail


--
To UNSUBSCRIBE, email to debian-user-REQUEST(a)lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster(a)lists.debian.org
Archive: http://lists.debian.org/l2m6b1504c41004091624u4cdeb9cfs20de1d81fb49c582(a)mail.gmail.com
From: Stephen Powell on
On Fri, 9 Apr 2010 17:57:04 -0400 (EDT), John Hasler wrote:
> Stephen Powell writes:
>> Yes, Hercules is an IBM mainframe emulator. But the problem is
>> licensing. There are some *very old* releases of IBM operating
>> systems that have passed into the public domain that you can run on
>> the Hercules emulator.
>> These are circa 1975 or so, which is about 35 years ago. An example
>> is VM/SP Release 6.

Oops! I meant to say VM/370 Release 6, not VM/SP Release 6. VM/SP
Release 6 is still proprietary.

-----

These are some of the issues that someone writing portable code
for ASCII vs. EBCDIC implementations needs to worry about.

(1) Collating sequence. In ASCII, the collating sequence is numbers
(0-9), followed by uppercase letters (A-Z), followed by lowercase
letters (a-z). Special characters are mixed throughout. In EBCDIC,
the collating sequence is lowercase letters (a-z), followed by
uppercase letters (A-Z), followed by numbers (0-9). So records
sorted alphabetically sort in a different order.

(2) Assumptions of continuity. In ASCII, the codes a-z and A-Z
are contiguous, with no codes in between. In EBCDIC, there are
six non-contiguous ranges, a-i, j-r, s-z, A-I, J-R, S-Z. Most
of the codes in between are non-printable characters, but not
all. For example, ~ sorts above r and below s, } sorts above I
and below J, and \ sorts above R and below S.

(3) Hidden assumptions about control codes. A program may, for
example, assume that X'0A' is a line feed and hard code it
somewhere. In ASCII, that is true. But in EBCDIC, a line feed
is X'25'.

(4) 7-bit assumptions. In U.S. standard ASCII, all the printable
characters are between the hex values of X'00'-X'7F'. Codes
above X'7F' are not standard codes. Historically, these indicate
the combination of the "Meta" key with a regular code. In
EBCDIC, the codes are sprinkled throughout the entire range of
X'00' through X'FF', with the numeric symbol 9 having the highest
code of any normal printable character (X'F9').

This is not an exhaustive list, but it gives you an idea
of what to watch for. Although the
following table has a few mistakes, this link will give you
an idea of ASCII vs. EBCDIC codes.

http://www.natural-innovations.com/computing/asciiebcdic.html

--
.''`. Stephen Powell <zlinuxman(a)wowway.com>
: :' :
`. `'`
`-


--
To UNSUBSCRIBE, email to debian-user-REQUEST(a)lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster(a)lists.debian.org
Archive: http://lists.debian.org/8691664.2246941270858506206.JavaMail.root(a)md01.wow.synacor.com
From: John Hasler on
Stephen Powell writes:
> These are some of the issues that someone writing portable code for
> ASCII vs. EBCDIC implementations needs to worry about.

But only library authors should need to worry about them. Application
programmers should use appropriate library calls.
--
John Hasler


--
To UNSUBSCRIBE, email to debian-user-REQUEST(a)lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster(a)lists.debian.org
Archive: http://lists.debian.org/87wrwgb0lc.fsf(a)thumper.dhh.gt.org