jan.ruzicka@comcast.net wrote:
On Jan 25, 2005, at 11:56, Frank Heckenbach wrote:
I guess we can take out one pair of quotes. Shouldn't really be a problem (just paranoia). Apparently that shell doesn't like nested quotes.
if gcc dummy.c > /dev/null 2>&1 && [ -r "$A_OUT" ] && [ x"`./$A_OUT 2> /dev/null`" = x"Ã" ]; then
Is there any way to have the non ASCII character escaped? I don't think the shell script necessary needs to reproduce non ascii characters correctly. Possibilities are compare result of hexdump or generate the output in a different way and use cmp.
What character should it be anyway? I see it as a capital letter A with umlaut.
Yes, that's what it should be.
Saved in a file it is 8000 hex.
That's strange. I know of no such charset. In Latin[129] (and perhaps some more) as well as Unicode it's hex C4. The output also contains a newline which is 0A (or 0D, or 0D, 0A on some systems). Nothing remotely similar to 8000!?
Adriaan van Os wrote:
The Macintosh has another character set for values > 127. The A-umlaut is auto-converted when you copy and paste it from email, but in the original script it looks like "Â" on the Mac. Does Linux/Unix have the same character set as WIndows (or the other way round) ?
Both Linux and Windows can use different charsets. Most systems, at least in Europe and America, probably use either Unicode or Latin1/Latin2/Latin9 AKA ISO 8859-1/-2/-15 (Linux) or a bastardization of it (Windows -- AFAIUI, they call it windows-1252, but sometimes wrongly declare it to be Latin1, e.g. in mail headers; the typical symptoms are wrong Euro signs, dashes and (non-ASCII) quotes, most other characters, including umlauts, seem to be the same).
Frank