From: Jerome BENOIT on
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
From: John Hasler on
Jerome BENOIT writes:
> 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.

Look at the Hercules System/370, ESA/390 and z/Architecture Emulator. I
believe that it can use EBCDIC.
--
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/874ojkecr0.fsf(a)thumper.dhh.gt.org
From: Stephen Powell on
On Fri, 9 Apr 2010 13:18:29 -0400 (EDT), Eduardo M KALINOWSKI wrote:
> On Fri, 9 Apr 2010, Jerome BENOIT wrote:
>> 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.
>
> There are still IBM Mainframes around that use EBCDIC (yes, that is
> not just an IT legend). I don't know if they can run a UNIX-like OS
> and if you can compile your C code to run on it, but even if you
> could, I'm not sure someone in possession of such mainframe will lend
> it for you to run your tests. :-)
>
> IBM Mainframes apart, I don't think any machine that you should
> actually care for is non-ASCII.

Eduardo is correct. IBM mainframes do use EBCDIC. They always have.
They always will. (Changing to ASCII now would break EVERYTHING.)
I am a systems programmer for IBM mainframes, and have been for the
last umpteen years; so I speak from personal experience. And yes,
modern mainframe operating systems do have a POSIX interface.
z/OS (MVS) calls it "Unix System Services". z/VM calls it
"OpenExtensions". It is a Unix-like interface, but it uses EBCDIC
internally.

You can also run GNU/Linux on a mainframe, either directly in an LPAR
or in a virtual machine under z/VM. But GNU/Linux is an ASCII-based
operating system, even when running on a mainframe. Linux device
drivers for the s390 architecture talk EBCDIC when necessary to
communicate with EBCDIC devices (such as I/O to the 3215 virtual console
under z/VM or reading the disk labels of OS- or CMS-formatted disks),
but as observed by an application program running under Linux on
the s390 architecture, it is running in a pure ASCII environment.

--
.''`. 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/1511468692.2177171270836098658.JavaMail.root(a)md01.wow.synacor.com
From: Stephen Powell on
On Fri, 9 Apr 2010 13:50:43 -0400 (EDT), John Hasler wrote:
> Jerome BENOIT writes:
>> 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.
>
> Look at the Hercules System/370, ESA/390 and z/Architecture Emulator. I
> believe that it can use EBCDIC.

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. The problem is that those operating systems don't have a C
compiler or a POSIX interface. Mainframe operating systems new enough to
have those features probably *can*, from a theoretical point of view,
run on Hercules, if properly configured. But these newer versions are by
no means free. They must be licensed from IBM, and you have to pay for it.
And IBM will not ordinarily license their mainframe software to run under
Hercules, except possibly in an emergency in a disaster recovery situation
or by special bid. And if they do license it to you by special bid, you
will probably have to pay a hefty price for it. What IBM wants, of course,
is for you to buy one of their entry-level mainframes and run it there.
They're trying to protect their hardware sales from encroachments by
Hercules.

Running the s390 architecture of Linux under Hercules is no problem.
In fact, I think that's how Debian builds and tests their s390 stuff.
But the overhead of the emulator is substantial. And Linux is an ASCII
architecture; so that doesn't buy you anything.

--
.''`. 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/1440843567.2191921270839630872.JavaMail.root(a)md01.wow.synacor.com
From: Kelly Clowers on
On Fri, Apr 9, 2010 at 09:14, Jerome BENOIT <jgmb65(a)rezozer.net> wrote:
> 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.

Well, Unicode, specifically the UTF-8 encoding, is generally the standard for
modern Linux systems. Of course, as long as you are using only characters
that are in ASCII, UTF-8 is compatible... There is also GB 18030, China's
Unicode encoding, but again, it is ASCII compatible.

The Win32, .NET and Java platforms all use UTF-16/USC-2 (it's complicated)
natively, which is not ASCII and is not ASCII compatible.

Joel's Unicode article is from 2003, but still very useful:
http://www.joelonsoftware.com/articles/Unicode.html

Some good essays from Tim Bray:
http://www.tbray.org/ongoing/When/200x/2003/04/06/Unicode
http://www.tbray.org/ongoing/When/200x/2003/04/13/Strings
http://www.tbray.org/ongoing/When/200x/2003/04/26/UTF
http://www.tbray.org/ongoing/When/200x/2003/04/30/JavaStrings


Cheers,
Kelly Clowers


--
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/n2r1840f6971004091329hd85a6b26vf1b296d5f189bb6f(a)mail.gmail.com