From: Morten Poulsen <morten@afdelingp.dk>
To: tromey@redhat.com
Cc: java@gcc.gnu.org
Subject: Re: outputting iso-8859-1 chars
Date: Thu, 25 Apr 2002 02:00:00 -0000 [thread overview]
Message-ID: <1019723168.14529.17.camel@prefect> (raw)
In-Reply-To: <874ri066pw.fsf@creche.redhat.com>
On Thu, 2002-04-25 at 01:02, Tom Tromey wrote:
> You don't say what platform you're on. I assume you're on Linux.
Yes, Linux 2.4.14 on a PIII and a 7400.
> On Linux the Sun JVM assumes that the C locale uses ISO-8859-1, when
> in fact it uses ASCII. libgcj respects this difference and outputs
> just ASCII, meaning that character > 0x7f is printed as `?'.
When I set my locale to da it still outouts a '?'.
> FYI, `gcj --encoding' tells gcj the encoding of your .java file. it
> doesn't affect the runtime behavior of your program (well, it can,
> since a given sequence of bytes in the input file can have a different
> meaning).
If I don't use it, I get
Hello.java:4: unrecognized character in input stream.
even for ISO-8859-1 characters in comments.
> Your problem is almost certainly on the printing end of things. Try
> setting your locale to something that uses ISO-8859-1. Or try using
> `new OutputStreamWriter (System.out, "ISO-8859-1")'
Thanks, that fixed it. I had the same problem when writing danish
characters to a socket. Inserting the above code fixed it there too.
Thanks for the help,
Morten
--
Morten Poulsen <morten@afdelingp.dk>
http://www.afdelingp.dk/
next prev parent reply other threads:[~2002-04-25 8:26 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 [this message]
2002-04-25 3:49 ` Oskar Liljeblad
2002-04-25 20:25 ` Morten Poulsen
2002-04-30 0:22 ` Tom Tromey
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=1019723168.14529.17.camel@prefect \
--to=morten@afdelingp.dk \
--cc=java@gcc.gnu.org \
--cc=tromey@redhat.com \
/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).