473,386 Members | 1,791 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

detecting ASCII/EBCDIC

Is there a way that a proram can detect whether it is operating in an
ASCII or an EBCDIC environment?
Sep 2 '08 #1
44 3812
Pilcrow <pi*****@pp.infowrites:
Is there a way that a proram can detect whether it is operating in an
ASCII or an EBCDIC environment?
You could do something like this:

if ('A' == 0x41) {
/* Probably ASCII. */
} else if ('A' == 0xc1) {
/* Probably EBCDIC. */
}
--
char a[]="\n .CJacehknorstu";int putchar(int);int main(void){unsigned long b[]
={0x67dffdff,0x9aa9aa6a,0xa77ffda9,0x7da6aa6a,0xa6 7f6aaa,0xaa9aa9f6,0x11f6},*p
=b,i=24;for(;p+=!*p;*p/=4)switch(0[p]&3)case 0:{return 0;for(p--;i--;i--)case+
2:{i++;if(i)break;else default:continue;if(0)case 1:putchar(a[i&15]);break;}}}
Sep 2 '08 #2
On Sep 3, 1:11 am, Pilcrow <pilc...@pp.infowrote:
Is there a way that a proram can detect whether it is operating in an
ASCII or an EBCDIC environment?

No.
But you can check if a certain symbol has been mapped to the same
value as ASCII/EBCDIC:

#if 'A' == 65
/* A is mapped to the same value as ASCII */
#elif
/* A is not mapped to the same value as ASCII */
#endif

That's not telling you much though.
Sep 2 '08 #3
Pilcrow said:
Is there a way that a proram can detect whether it is operating in an
ASCII or an EBCDIC environment?
Almost.

What you can do is check code points for the basic character set. If 'A' is
65, and 'B' is 66, and... (etc) and 'Z' is, er, 90, and 'a' is 97, and 'b'
is 98, and... (etc) and 'z' is 122, and the digits are 48 through 57, and
' ' is 32, and so on and so forth with all the !"%^&*()_-=+<,>.?/\\;:'~#
stuff, and if '\n' is 10 and '\r' is 13 and '\f' is 12 and so on, then the
chances are very good that it's ASCII.

Some trick for EBCDIC, but with different numbers.

Not 100% foolproof, but it may suit your needs - and if those two character
sets are your only two choices, then you can do it with a single
comparison ('A' == 65) and be assured that your result is correct.

--
Richard Heathfield <http://www.cpax.org.uk>
Email: -http://www. +rjh@
Google users: <http://www.cpax.org.uk/prg/writings/googly.php>
"Usenet is a strange place" - dmr 29 July 1999
Sep 2 '08 #4
On 2 Sep 2008 at 22:11, Pilcrow wrote:
Is there a way that a proram can detect whether it is operating in an
ASCII or an EBCDIC environment?
#include <stdio.h>
#include <time.h>

int main(void)
{
time_t t;
time(&t);
if(gmtime(&t)->tm_year 75)
puts("ASCII!");
return 0;
}

Sep 2 '08 #5
On Sep 3, 1:22 am, vipps...@gmail.com wrote:
On Sep 3, 1:11 am, Pilcrow <pilc...@pp.infowrote:
Is there a way that a proram can detect whether it is operating in an
ASCII or an EBCDIC environment?

No.
But you can check if a certain symbol has been mapped to the same
value as ASCII/EBCDIC:

#if 'A' == 65
/* A is mapped to the same value as ASCII */
#elif
^^^^
That should've been 'else'.
Sep 2 '08 #6
On Sep 3, 1:29 am, Richard Heathfield <r...@see.sig.invalidwrote:
Pilcrow said:
Is there a way that a proram can detect whether it is operating in an
ASCII or an EBCDIC environment?

Almost.

What you can do is check code points for the basic character set. If 'A' is
65, and 'B' is 66, and... (etc) and 'Z' is, er, 90, and 'a' is 97, and 'b'
is 98, and... (etc) and 'z' is 122, and the digits are 48 through 57, and [...]
You only need to check for one digit, it's guaranteed that '9' - '0'
== 9.

<snip>

Sep 2 '08 #7
Pilcrow wrote:
Is there a way that a proram can detect whether it is operating in an
ASCII or an EBCDIC environment?
You could check some known chars against the EBCDIC and ASCII
numeric values:

if ('0' == 48 && 'A' == 65 && 'z' == 122 && ...)
puts ("Looks like ASCII");
else if ('0' == 240 && 'A' == 193 && 'z' == 169 && ...)
puts ("Looks like EBCDIC");
else
puts ("Now I *know* we're not in Kansas!");

It seems an uncertain business, though, because both ASCII and EBCDIC
define characters that can't be written as portable character literals
(what do you put between the '' to get EBCDIC's RSP character *and*
have it mean something on an ASCII system?), and because I don't see
how you can reliably distinguish between an ASCII system and one that
uses a more modern encoding that includes ASCII as a subset.

What's the purpose?

--
Er*********@sun.com
Sep 2 '08 #8
Pilcrow wrote:
Is there a way that a proram can detect whether it is operating in an
ASCII or an EBCDIC environment?
You can check character values. Why do you want to?


Brian
Sep 2 '08 #9
vi******@gmail.com writes:
But you can check if a certain symbol has been mapped to the same
value as ASCII/EBCDIC:

#if 'A' == 65
/* A is mapped to the same value as ASCII */
#elif
/* A is not mapped to the same value as ASCII */
#endif
I don't think that's guaranteed to work, because preprocessor
directives are interpreted in the source character set, which may
differ arbitrarily from the execution character set. It could be
the case that the source character set is ASCII and the execution
character set is EBCDIC, as far as I know.
--
char a[]="\n .CJacehknorstu";int putchar(int);int main(void){unsigned long b[]
={0x67dffdff,0x9aa9aa6a,0xa77ffda9,0x7da6aa6a,0xa6 7f6aaa,0xaa9aa9f6,0x11f6},*p
=b,i=24;for(;p+=!*p;*p/=4)switch(0[p]&3)case 0:{return 0;for(p--;i--;i--)case+
2:{i++;if(i)break;else default:continue;if(0)case 1:putchar(a[i&15]);break;}}}
Sep 2 '08 #10
On September 2, 2008 18:11, in comp.lang.c, Pilcrow (pi*****@pp.info) wrote:
Is there a way that a proram can detect whether it is operating in an
ASCII or an EBCDIC environment?
Which EBCDIC? There are about 30 EBCDIC variants to choose from. See all the
EBCDIC-xx charts at http://anubis.dkuug.dk/i18n/charmaps/ (the site of the
ISO Internationalization effort)

FWIW, the exclamation mark ('!') is 0x21 in ASCII, 0x5a in EBCDIC-US, and
0x4f in EBCDIC-INT.

--
Lew Pitcher

Master Codewright & JOAT-in-training | Registered Linux User #112576
http://pitcher.digitalfreehold.ca/ | GPG public key available by request
---------- Slackware - Because I know what I'm doing. ------
Sep 2 '08 #11
On Sep 3, 2:09 am, Ben Pfaff <b...@cs.stanford.eduwrote:
vipps...@gmail.com writes:
But you can check if a certain symbol has been mapped to the same
value as ASCII/EBCDIC:
#if 'A' == 65
/* A is mapped to the same value as ASCII */
#elif
/* A is not mapped to the same value as ASCII */
#endif

I don't think that's guaranteed to work, because preprocessor
directives are interpreted in the source character set, which may
differ arbitrarily from the execution character set. It could be
the case that the source character set is ASCII and the execution
character set is EBCDIC, as far as I know.
Ah - I did not think of that. Then perhaps change it to `if'.

if('A' == 65) { ... }
Sep 3 '08 #12
Pilcrow <pi*****@pp.infowrites:
Is there a way that a proram can detect whether it is operating in an
ASCII or an EBCDIC environment?
As others have suggested, testing the numeric values of some
characters will probably tell you.

But note that there are several different variants of EBCDIC. As for
ASCII, remember that it's only a 7-bit character set. There are
numerous larger sets based on ASCII. There are the 8-bit ISO 8859-N
sets, with N running from 1 to about 15 last I heard. There's
Unicode. There's a Windows-specific 8-bit extension to ASCII. And
there are national variants that replace some of the punctuation
characters with accented letters, though these aren't used much
anymore.

If at all possible, it's better to write your code so it will work
with *any* character set. For example, if you want to know whether a
character is a lowercase letter, don't use (c >= 'a' && c <= 'z'), use
isascii(unsigned char(c)).

What problem are you really trying to solve?

--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
Nokia
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
Sep 3 '08 #13
On Sep 3, 3:47 am, Keith Thompson <ks...@mib.orgwrote:
Pilcrow <pilc...@pp.infowrites:
Is there a way that a proram can detect whether it is operating in an
ASCII or an EBCDIC environment?

As others have suggested, testing the numeric values of some
characters will probably tell you.

But note that there are several different variants of EBCDIC. As for
ASCII, remember that it's only a 7-bit character set. There are
numerous larger sets based on ASCII. There are the 8-bit ISO 8859-N
sets, with N running from 1 to about 15 last I heard. There's
Unicode. There's a Windows-specific 8-bit extension to ASCII. And
there are national variants that replace some of the punctuation
characters with accented letters, though these aren't used much
anymore.

If at all possible, it's better to write your code so it will work
with *any* character set. For example, if you want to know whether a
character is a lowercase letter, don't use (c >= 'a' && c <= 'z'), use
isascii(unsigned char(c)).
That should be islower((unsigned char)c) of course.
(it's not the unsigned char mistake that bugs me; it's the isascii()
one :S)
Sep 3 '08 #14
vi******@gmail.com writes:
On Sep 3, 3:47 am, Keith Thompson <ks...@mib.orgwrote:
[...]
>If at all possible, it's better to write your code so it will work
with *any* character set. For example, if you want to know whether a
character is a lowercase letter, don't use (c >= 'a' && c <= 'z'), use
isascii(unsigned char(c)).

That should be islower((unsigned char)c) of course.
(it's not the unsigned char mistake that bugs me; it's the isascii()
one :S)
D'oh! You're right, of course (and both mistakes bug me equally).

--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
Nokia
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
Sep 3 '08 #15
On Tue, 02 Sep 2008 15:11:49 -0700, Pilcrow <pi*****@pp.infowrote:
>Is there a way that a proram can detect whether it is operating in an
ASCII or an EBCDIC environment?
OK, it seems I have my answer: if('i' + 1 != 'j') we definitely don't
have ASCII. Most likely we have some flavor of EBCDIC. But, since the
compiler will have been compiled in either the ASCII or the EBCDIC
environment, it seems that there could have been some macro that would
have told us so directly.

IBM definitely is MS's predecessor in promoting incompatibility. But I
knew that years ago.

Again, I apologize for inadvertantly casting aspersions on your favorite
language. People often (and in clc) make slurs against Perl; it doesn't
bother me.
Sep 3 '08 #16
On Sep 3, 7:41 am, Pilcrow <pilc...@pp.infowrote:
On Tue, 02 Sep 2008 15:11:49 -0700, Pilcrow <pilc...@pp.infowrote:
Is there a way that a proram can detect whether it is operating in an
ASCII or an EBCDIC environment?

OK, it seems I have my answer: if('i' + 1 != 'j') we definitely don't
That expression invokes undefined behavior if 'i' equals INT_MAX.

<snip>

Sep 3 '08 #17
On Tue, 2 Sep 2008 21:49:51 -0700 (PDT), vi******@gmail.com wrote:
>On Sep 3, 7:41 am, Pilcrow <pilc...@pp.infowrote:
>On Tue, 02 Sep 2008 15:11:49 -0700, Pilcrow <pilc...@pp.infowrote:
>Is there a way that a proram can detect whether it is operating in an
ASCII or an EBCDIC environment?

OK, it seems I have my answer: if('i' + 1 != 'j') we definitely don't

That expression invokes undefined behavior if 'i' equals INT_MAX.

<snip>
Would it ever? and when?
Sep 3 '08 #18
On Tue, 02 Sep 2008 21:49:51 -0700, vippstar wrote:
On Sep 3, 7:41 am, Pilcrow <pilc...@pp.infowrote:
>On Tue, 02 Sep 2008 15:11:49 -0700, Pilcrow <pilc...@pp.infowrote:
>Is there a way that a proram can detect whether it is operating in an
ASCII or an EBCDIC environment?

OK, it seems I have my answer: if('i' + 1 != 'j') we definitely don't

That expression invokes undefined behavior if 'i' equals INT_MAX.
If the character set is either ASCII or EBCDIC, 'i' cannot equal INT_MAX.
If it is not, the check is insufficient anyway.
Sep 3 '08 #19
Harald van Dijk wrote:
On Tue, 02 Sep 2008 21:49:51 -0700, vippstar wrote:
>On Sep 3, 7:41 am, Pilcrow <pilc...@pp.infowrote:
>>On Tue, 02 Sep 2008 15:11:49 -0700, Pilcrow <pilc...@pp.infowrote:
Is there a way that a proram can detect whether it is operating in an
ASCII or an EBCDIC environment?
OK, it seems I have my answer: if('i' + 1 != 'j') we definitely don't
That expression invokes undefined behavior if 'i' equals INT_MAX.

If the character set is either ASCII or EBCDIC, 'i' cannot equal INT_MAX.
If it is not, the check is insufficient anyway.
if ('a' != 97) puts("Not ASCII");
if ('a' != 129) puts("Not EBCDIC");

--
pete
Sep 3 '08 #20
On Sep 3, 8:03 am, Harald van D©¦k <true...@gmail.comwrote:
On Tue, 02 Sep 2008 21:49:51 -0700, vippstar wrote:
On Sep 3, 7:41 am, Pilcrow <pilc...@pp.infowrote:
On Tue, 02 Sep 2008 15:11:49 -0700, Pilcrow <pilc...@pp.infowrote:
Is there a way that a proram can detect whether it is operating in an
ASCII or an EBCDIC environment?
OK, it seems I have my answer: if('i' + 1 != 'j') we definitely don't
That expression invokes undefined behavior if 'i' equals INT_MAX.

If the character set is either ASCII or EBCDIC, 'i' cannot equal INT_MAX.
So? 'i' + 1 still invokes undefined behavior :)
If it is not, the check is insufficient anyway.
I agree.
Sep 3 '08 #21
On 2 Sep, 23:25, Antoninus Twink <nos...@nospam.invalidwrote:
On 2 Sep 2008 at 22:11, Pilcrow wrote:
Is there a way that a proram can detect whether it is operating in an
ASCII or an EBCDIC environment?

#include <stdio.h>
#include <time.h>

int main(void)
{
time_t t;
time(&t);
if(gmtime(&t)->tm_year 75)
puts("ASCII!");
return 0;
}
despite what twink implies I believe EBCDIC machines do still
exist. The IBM mainfram world is still alive and well.
--
Nick Keighley
Sep 3 '08 #22
Nick Keighley <ni******************@hotmail.comwrites:
On 2 Sep, 23:25, Antoninus Twink <nos...@nospam.invalidwrote:
>On 2 Sep 2008 at 22:11, Pilcrow wrote:
Is there a way that a proram can detect whether it is operating in an
ASCII or an EBCDIC environment?

#include <stdio.h>
#include <time.h>

int main(void)
{
time_t t;
time(&t);
if(gmtime(&t)->tm_year 75)
puts("ASCII!");
return 0;
}

despite what twink implies I believe EBCDIC machines do still
exist. The IBM mainfram world is still alive and well.
Yes. But one has to wonder how many routines written by people looking
for help here will end up running on them....
Sep 3 '08 #23

<vi******@gmail.comwrote in message
news:f0**********************************@z66g2000 hsc.googlegroups.com...
On Sep 3, 7:41 am, Pilcrow <pilc...@pp.infowrote:
>On Tue, 02 Sep 2008 15:11:49 -0700, Pilcrow <pilc...@pp.infowrote:
>Is there a way that a proram can detect whether it is operating in an
ASCII or an EBCDIC environment?

OK, it seems I have my answer: if('i' + 1 != 'j') we definitely don't

That expression invokes undefined behavior if 'i' equals INT_MAX.
If one has to continually worry about a+1 invoking undefined behaviour, then
no line of code is ever going to get written.

Anyway your example should give a compile-time error.

--
Bartc

Sep 3 '08 #24
On Sep 3, 12:15 pm, "Bartc" <b...@freeuk.comwrote:
<vipps...@gmail.comwrote in message

news:f0**********************************@z66g2000 hsc.googlegroups.com...
On Sep 3, 7:41 am, Pilcrow <pilc...@pp.infowrote:
OK, it seems I have my answer: if('i' + 1 != 'j') we definitely don't
That expression invokes undefined behavior if 'i' equals INT_MAX.

If one has to continually worry about a+1 invoking undefined behaviour, then
no line of code is ever going to get written.
a+1 no. 'i' + 1 perhaps, and I disagree. There's already many lines of
code written that do not invoke undefined behavior.
Anyway your example should give a compile-time error.
I know. I have written a correction in a follow-up
Message-ID:
<79**********************************@y21g2000hsf. googlegroups.com>
Unless you are referring to something else.
Sep 3 '08 #25
Pilcrow wrote:
On Tue, 02 Sep 2008 15:11:49 -0700, Pilcrow <pi*****@pp.infowrote:
>Is there a way that a proram can detect whether it is operating in an
ASCII or an EBCDIC environment?

OK, it seems I have my answer: if('i' + 1 != 'j') we definitely don't
have ASCII. Most likely we have some flavor of EBCDIC. But, since the
compiler will have been compiled in either the ASCII or the EBCDIC
environment, it seems that there could have been some macro that would
have told us so directly.
I think you're assuming that ASCII and EBCDIC are the only two
possibilities. There are LOTS of other possibilities, including a fairly
large number that are in wide use. Unicode, in particular, is very
widely used.
Sep 3 '08 #26
Pilcrow wrote:
On Tue, 02 Sep 2008 15:11:49 -0700, Pilcrow <pi*****@pp.infowrote:
>Is there a way that a proram can detect whether it is operating in an
ASCII or an EBCDIC environment?

OK, it seems I have my answer: if('i' + 1 != 'j') we definitely don't
have ASCII. Most likely we have some flavor of EBCDIC. But, since the
compiler will have been compiled in either the ASCII or the EBCDIC
environment, it seems that there could have been some macro that would
have told us so directly.
I don't see how. When you take into account the fact that
things like "code pages" can change at run-time, the compiler
seems at a disadvantage in trying to predict them ...

Again, what's the purpose? What are you trying to accomplish
that requires you to know whether the system uses ASCII (which
variant?), EBCDIC (which variant?), ISO 8859-1, ...?

--
Er*********@sun.com
Sep 3 '08 #27
Eric Sosman <Er*********@sun.comwrites:
Pilcrow wrote:
On Tue, 02 Sep 2008 15:11:49 -0700, Pilcrow <pi*****@pp.infowrote:
Is there a way that a proram can detect whether it is operating in an
ASCII or an EBCDIC environment?
OK, it seems I have my answer: if('i' + 1 != 'j') we definitely don't
have ASCII. Most likely we have some flavor of EBCDIC. But, since the
compiler will have been compiled in either the ASCII or the EBCDIC
environment, it seems that there could have been some macro that would
have told us so directly.

I don't see how. When you take into account the fact that
things like "code pages" can change at run-time, the compiler
seems at a disadvantage in trying to predict them ...
ISTR that the characters in the basic characters set have their code the
same in all supported locale (ie you can't have support for both a
EBCDIC-based and a ASCII-based locale without having one of them remap the
characters).

Yours,

--
Jean-Marc
Sep 3 '08 #28
Jean-Marc Bourguet wrote:
Eric Sosman <Er*********@sun.comwrites:
>Pilcrow wrote:
>>On Tue, 02 Sep 2008 15:11:49 -0700, Pilcrow <pi*****@pp.infowrote:

Is there a way that a proram can detect whether it is operating in an
ASCII or an EBCDIC environment?
OK, it seems I have my answer: if('i' + 1 != 'j') we definitely don't
have ASCII. Most likely we have some flavor of EBCDIC. But, since the
compiler will have been compiled in either the ASCII or the EBCDIC
environment, it seems that there could have been some macro that would
have told us so directly.
I don't see how. When you take into account the fact that
things like "code pages" can change at run-time, the compiler
seems at a disadvantage in trying to predict them ...

ISTR that the characters in the basic characters set have their code the
same in all supported locale (ie you can't have support for both a
EBCDIC-based and a ASCII-based locale without having one of them remap the
characters).
If the question is restricted to the encoding of the
basic execution set -- the characters that the Standard
requires to be present -- then a straightforward exhaustive
test can determine whether the encoding for those characters
is "consistent with ASCII" or "consistent with EBCDIC" or
"consistent with neither." But is that enough for the O.P.?
Again, yet again, we get back to the question: What is he
*really* trying to find out, and why? (Since the question
has been asked at least four times by at least three people
and has elicited no answer, I'm beginning to think he doesn't
know.)

--
Eric Sosman
es*****@ieee-dot-org.invalid
Sep 4 '08 #29
"Eric Sosman" writes:
If the question is restricted to the encoding of the
basic execution set -- the characters that the Standard
requires to be present -- then a straightforward exhaustive
test can determine whether the encoding for those characters
is "consistent with ASCII" or "consistent with EBCDIC" or
"consistent with neither." But is that enough for the O.P.?
Again, yet again, we get back to the question: What is he
*really* trying to find out, and why? (Since the question
has been asked at least four times by at least three people
and has elicited no answer, I'm beginning to think he doesn't
know.)
My guess is that he is one of those annoying (to many of the regulars on
this froup) curious guys who just likes to know things.

Pretty pathetic, huh?

Sep 4 '08 #30

On Wed, 3 Sep 2008 20:03:51 -0700, "osmium" <r1********@comcast.net>
wrote:
>"Eric Sosman" writes:
> If the question is restricted to the encoding of the
basic execution set -- the characters that the Standard
requires to be present -- then a straightforward exhaustive
test can determine whether the encoding for those characters
is "consistent with ASCII" or "consistent with EBCDIC" or
"consistent with neither." But is that enough for the O.P.?
Again, yet again, we get back to the question: What is he
*really* trying to find out, and why? (Since the question
has been asked at least four times by at least three people
and has elicited no answer, I'm beginning to think he doesn't
know.)

My guess is that he is one of those annoying (to many of the regulars on
this froup) curious guys who just likes to know things.

Pretty pathetic, huh?
Thank you, Os.
----
If you refrain from asking questions from fear of seeming
stupid, you'll never learn, and that would be stupid.
Sep 4 '08 #31
On Tue, 02 Sep 2008 21:41:45 -0700, Pilcrow <pi*****@pp.infowrote:
snip
>
IBM definitely is MS's predecessor in promoting incompatibility. But I
knew that years ago.
Incompatibility with what? Baudot?

--
Remove del for email
Sep 4 '08 #32
On Wed, 03 Sep 2008 21:12:11 -0700, Barry Schwarz <sc******@dqel.com>
wrote:
>On Tue, 02 Sep 2008 21:41:45 -0700, Pilcrow <pi*****@pp.infowrote:
snip
>>
IBM definitely is MS's predecessor in promoting incompatibility. But I
knew that years ago.

Incompatibility with what? Baudot?
In IBM's case, often with itself.
----
If you refrain from asking questions from fear of seeming
stupid, you'll never learn, and that would be stupid.
Sep 4 '08 #33
Pilcrow said:
On Thu, 04 Sep 2008 04:22:06 +0000, Richard Heathfield
<rj*@see.sig.invalidwrote:
>>Pilcrow said:
<snip>
>>
>>If you refrain from asking questions from fear of seeming
stupid, you'll never learn, and that would be stupid.

And if you refrain from asking clear questions from fear of seeming
verbose, you'll never get a clear answer, and that, too, would be stupid.

And if I don't know enough to put a question in the acceptable form?
It's not so much a matter of "the acceptable form" - plenty of forms are
acceptable (and plenty are unacceptable to a greater or lesser extent for
various reasons). It's more a matter of followup. If you don't tell us
enough about what you need so that we can supply a decent answer, we'll
generally ask you for more information (as in this case). If you don't
supply that information, you're not going to learn as much as you'd hoped.
With the possible exception of Chris Torek, people aren't going to give
you a complete treatise on the entire subject just because you weren't
clear about the bit you were interested in.
Humility is a virtue, but true humility often seems arrogant.
Tell me about it.
However, this thread has taught me a lot, and I thank all of you.
You're welcome. But I think you'd have learned more about what you wanted
to learn about, if you'd been clearer about what that actually was.

--
Richard Heathfield <http://www.cpax.org.uk>
Email: -http://www. +rjh@
Google users: <http://www.cpax.org.uk/prg/writings/googly.php>
"Usenet is a strange place" - dmr 29 July 1999
Sep 4 '08 #34
On Thu, 04 Sep 2008 04:46:04 +0000, Richard Heathfield
<rj*@see.sig.invalidwrote:
>Pilcrow said:
>On Thu, 04 Sep 2008 04:22:06 +0000, Richard Heathfield
<rj*@see.sig.invalidwrote:
>>>Pilcrow said:
<snip>
>>>
If you refrain from asking questions from fear of seeming
stupid, you'll never learn, and that would be stupid.

And if you refrain from asking clear questions from fear of seeming
verbose, you'll never get a clear answer, and that, too, would be stupid.

And if I don't know enough to put a question in the acceptable form?

It's not so much a matter of "the acceptable form" - plenty of forms are
acceptable (and plenty are unacceptable to a greater or lesser extent for
various reasons). It's more a matter of followup. If you don't tell us
enough about what you need so that we can supply a decent answer, we'll
generally ask you for more information (as in this case). If you don't
supply that information, you're not going to learn as much as you'd hoped.
With the possible exception of Chris Torek, people aren't going to give
you a complete treatise on the entire subject just because you weren't
clear about the bit you were interested in.
>Humility is a virtue, but true humility often seems arrogant.

Tell me about it.
>However, this thread has taught me a lot, and I thank all of you.

You're welcome. But I think you'd have learned more about what you wanted
to learn about, if you'd been clearer about what that actually was.
Sometimes it's hard to know what you want to know unless you already
know it -- catch 22, y'know.

----
If you refrain from asking questions from fear of seeming
stupid, you'll never learn, and that would be stupid.
Sep 4 '08 #35
"osmium" <r1********@comcast.netwrote:
"Eric Sosman" writes:
If the question is restricted to the encoding of the
basic execution set -- the characters that the Standard
requires to be present -- then a straightforward exhaustive
test can determine whether the encoding for those characters
is "consistent with ASCII" or "consistent with EBCDIC" or
"consistent with neither." But is that enough for the O.P.?
Again, yet again, we get back to the question: What is he
*really* trying to find out, and why? (Since the question
has been asked at least four times by at least three people
and has elicited no answer, I'm beginning to think he doesn't
know.)

My guess is that he is one of those annoying (to many of the regulars on
this froup) curious guys who just likes to know things.

Pretty pathetic, huh?
No, he's one of those annoying not-quite-curious-enough guys who doesn't
know _what_ he wants to know, he just likes to ask half-baked questions.

And yes, that's pretty pathetic.

Richard
Sep 4 '08 #36
On Thu, 04 Sep 2008 06:40:18 GMT, rl*@hoekstra-uitgeverij.nl (Richard
Bos) wrote:
>"osmium" <r1********@comcast.netwrote:
>"Eric Sosman" writes:
If the question is restricted to the encoding of the
basic execution set -- the characters that the Standard
requires to be present -- then a straightforward exhaustive
test can determine whether the encoding for those characters
is "consistent with ASCII" or "consistent with EBCDIC" or
"consistent with neither." But is that enough for the O.P.?
Again, yet again, we get back to the question: What is he
*really* trying to find out, and why? (Since the question
has been asked at least four times by at least three people
and has elicited no answer, I'm beginning to think he doesn't
know.)

My guess is that he is one of those annoying (to many of the regulars on
this froup) curious guys who just likes to know things.

Pretty pathetic, huh?

No, he's one of those annoying not-quite-curious-enough guys who doesn't
know _what_ he wants to know, he just likes to ask half-baked questions.

And yes, that's pretty pathetic.

Richard
Sometimes you don't know what you want to learn until you've learned it.
-- Catch-22.
----
Everybody needs somebody that they can look down on.
If you ain't got noone else, why, help yourself to me.
Sep 4 '08 #37
"osmium" <r1********@comcast.netwrites:
"Eric Sosman" writes:
> If the question is restricted to the encoding of the
basic execution set -- the characters that the Standard
requires to be present -- then a straightforward exhaustive
test can determine whether the encoding for those characters
is "consistent with ASCII" or "consistent with EBCDIC" or
"consistent with neither." But is that enough for the O.P.?
Again, yet again, we get back to the question: What is he
*really* trying to find out, and why? (Since the question
has been asked at least four times by at least three people
and has elicited no answer, I'm beginning to think he doesn't
know.)

My guess is that he is one of those annoying (to many of the regulars on
this froup) curious guys who just likes to know things.

Pretty pathetic, huh?
No, not at all.

But a question asked for the sake of curiosity might have a different
answer than the very same question asked for the sake of accomplishing
some specific task, so actually telling us why he wants to know could
make it a lot easier for us to provide the answer he wants.

--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
Nokia
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
Sep 4 '08 #38
Pilcrow <pi*****@pp.infowrites:
Sometimes you don't know what you want to learn until you've learned it.
-- Catch-22.
That's why some are asking you the problem you want to solve instead of
giving you 42 different ways of achieving something which could even not be
part of the correct solution.

Yours,

--
Jean-Marc
Sep 4 '08 #39
Pilcrow wrote:
On Thu, 04 Sep 2008 06:40:18 GMT, rl*@hoekstra-uitgeverij.nl (Richard
Bos) wrote:
>"osmium" <r1********@comcast.netwrote:
....
>>My guess is that he is one of those annoying (to many of the regulars on
this froup) curious guys who just likes to know things.

Pretty pathetic, huh?
No, he's one of those annoying not-quite-curious-enough guys who doesn't
know _what_ he wants to know, he just likes to ask half-baked questions.

And yes, that's pretty pathetic.

Richard

Sometimes you don't know what you want to learn until you've learned it.
That's why you're being asked about the purpose of your question. No
matter how little you know about a subject, if you are asking questions
about it, you should at least know what your purpose was for asking the
questions. It is, after all, your purpose - if you don't know what it
was, you didn't have one, in which case you wouldn't have bothered asking.

For instance, yesterday my wife (a non-native speaker of English) asked
me what some word (I think it was "eftr") meant. I didn't recognize the
word. so I asked her why she wanted to know. She explained that she was
reading a document which referred to a given strain of bacteria as "EFTR
code 54321" (that is not the actual code). I immediately recognized,
from context, that EFTR was not a word, but an abbreviation for
something (I still don't know what) that assigns codes to bacterial
strains. My wife didn't know what it was she needed to ask, but by
knowing why she wanted to know it, I was able to tell her that she
needed to find out what EFTR was an abbreviation for.
Sep 4 '08 #40
In article <ln************@nuthaus.mib.org>,
Keith Thompson <ks***@mib.orgwrote:
....
>No, not at all.
Yes. Quite. Osmium hit the bullseye here. The regs don't like it.
>But a question asked for the sake of curiosity might have a different
answer than the very same question asked for the sake of accomplishing
some specific task, so actually telling us why he wants to know could
make it a lot easier for us to provide the answer he wants.
Blah, blah, blah.

Sep 4 '08 #41
osmium wrote:
"Eric Sosman" writes:
> If the question is restricted to the encoding of the
basic execution set -- the characters that the Standard
requires to be present -- then a straightforward exhaustive
test can determine whether the encoding for those characters
is "consistent with ASCII" or "consistent with EBCDIC" or
"consistent with neither." But is that enough for the O.P.?
Again, yet again, we get back to the question: What is he
*really* trying to find out, and why? (Since the question
has been asked at least four times by at least three people
and has elicited no answer, I'm beginning to think he doesn't
know.)

My guess is that he is one of those annoying (to many of the regulars on
this froup) curious guys who just likes to know things.

Pretty pathetic, huh?
You may find Pilcrow pathetic and annoying, but I don't.
He's groping a bit, exploring an area he doesn't yet quite
understand, that's all. He asked a question that he presumably
thought was simple, and is now learning that the matter is more
complicated than he thought and that the question really didn't
make sense as it stood. That's why I think he "doesn't know:"
he thought he knew, but has learned that he didn't. It's a sort
of Socratic inquiry in reverse.

"When you are a Bear of Very Little Brain, and you think
of Things, you find sometimes that a Thing which seemed
very Thingish inside you is quite different when it gets
out into the open and has other people looking at it."
-- A.A. Milne

--
Er*********@sun.com
Sep 4 '08 #42
Eric Sosman said:
osmium wrote:
<snip>
>My guess is that he is one of those annoying (to many of the regulars on
this froup) curious guys who just likes to know things.

Pretty pathetic, huh?

You may find Pilcrow pathetic and annoying, but I don't.
I see from your headers that you appear to be using Windows. Fire up
Microsoft Irony, and click the Options menu. On the resulting dialog,
you'll see a Sensitivity control. Drag it a few pixels up. Then click OK.
:-)

--
Richard Heathfield <http://www.cpax.org.uk>
Email: -http://www. +rjh@
Google users: <http://www.cpax.org.uk/prg/writings/googly.php>
"Usenet is a strange place" - dmr 29 July 1999
Sep 4 '08 #43
"Eric Sosman" wrote:
osmium wrote:
>"Eric Sosman" writes:
>> If the question is restricted to the encoding of the
basic execution set -- the characters that the Standard
requires to be present -- then a straightforward exhaustive
test can determine whether the encoding for those characters
is "consistent with ASCII" or "consistent with EBCDIC" or
"consistent with neither." But is that enough for the O.P.?
Again, yet again, we get back to the question: What is he
*really* trying to find out, and why? (Since the question
has been asked at least four times by at least three people
and has elicited no answer, I'm beginning to think he doesn't
know.)

My guess is that he is one of those annoying (to many of the regulars on
this froup) curious guys who just likes to know things.

Pretty pathetic, huh?

You may find Pilcrow pathetic and annoying, but I don't.
I'll bet you failed Sarcasm 101.
Sep 4 '08 #44
osmium wrote:
"Eric Sosman" wrote:
>osmium wrote:
>>[...]
Pretty pathetic, huh?
You may find Pilcrow pathetic and annoying, but I don't.

I'll bet you failed Sarcasm 101.
No, I passed by finding a web site with all the test answers
and memorizing them. ;-)

Your "Pretty pathetic, huh?" was easy to recognize as sarcasm,
but the target thereof was less than clear. If you want to say
something without risking misunderstanding, learn to aim better
than Dick Cheney.

--
Er*********@sun.com
Sep 4 '08 #45

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Ranjan | last post by:
Hi folks! I am trying to convert EBCDIC file to ASCII file. the issues are 1) Can all EBCDIC file be converted to ASCII without loss of information.(There is one character cent sign which is not...
5
by: tushar.saxena | last post by:
This post is a follow up to the post at : http://groups.google.com/group/comp.lang.c++/browse_thread/thread/83af6123fa945e8b?hl=ug#9eaa6fab5622424e as my original question was answered there, but I...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.