From: Tom Tromey <tromey@redhat.com>
To: Morten Poulsen <morten@afdelingp.dk>
Cc: Oskar Liljeblad <oskar@osk.mine.nu>, java@gcc.gnu.org
Subject: Re: outputting iso-8859-1 chars
Date: Tue, 30 Apr 2002 00:22:00 -0000 [thread overview]
Message-ID: <87it6adzn5.fsf@creche.redhat.com> (raw)
In-Reply-To: Morten Poulsen's message of "25 Apr 2002 12:49:22 +0200"
>>>>> "Morten" == Morten Poulsen <morten@afdelingp.dk> writes:
Morten> Are you using a newer version than 3.0.4 ?
Morten> $ LC_CTYPE=C ./a.out
Morten> xxx?xxx
Morten> $ LC_CTYPE=en_GB ./a.out
Morten> xxx?xxx
I looked at the 3.0 branch sources using cvsweb. They have enough
support in them that this should work.
The default output encoding is chosen in libjava/java/lang/natSystem.cc.
Well, it is if various things are found by configure; in your case
this almost certainly happens since (1) Linux has all the features in
question, and (2) if we don't find the features we need we default to
ISO-8859-1 (which would contradict the results you see).
So I think the question is why you aren't seeing what we'd expect.
Try compiling and running this program:
#include <stdio.h>
#include <locale.h>
#include <langinfo.h>
int main ()
{
char *x;
setlocale (LC_CTYPE, "");
x = nl_langinfo (CODESET);
printf ("%s\n", x);
}
I get this:
creche. ./a
ANSI_X3.4-1968
creche. LC_CTYPE=en_GB ./a
ISO-8859-1
If this program doesn't print ISO-8859-1 (or some alias) when
LC_CTYPE=en_GB, then I think the problem is in your libc. Otherwise
maybe the problem is in libjava; you'd have to do some debugging to
figure out what is going wrong.
Tom
next prev parent reply other threads:[~2002-04-29 20:14 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-04-24 15:56 Morten Poulsen
2002-04-24 22:48 ` Tom Tromey
2002-04-25 2:00 ` Morten Poulsen
2002-04-25 3:49 ` Oskar Liljeblad
2002-04-25 20:25 ` Morten Poulsen
2002-04-30 0:22 ` Tom Tromey [this message]
2002-05-01 4:09 ` Morten Poulsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87it6adzn5.fsf@creche.redhat.com \
--to=tromey@redhat.com \
--cc=java@gcc.gnu.org \
--cc=morten@afdelingp.dk \
--cc=oskar@osk.mine.nu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).