Bug#197375: gcj dies en parsing java code with high ASCII values in it
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi...
On Sun, 15 Jun 2003 01:28 am, Martin v. Löwis wrote:
> Peter Hawkins <peter@hawkins.emu.id.au> writes:
> > gcj doesn't appear to like high-valued characters in it's input stream.
>
> Please don't use the term "high ASCII", there is no such thing. Most
> likely, you are talking about Latin-1 (but it could also be that you
> are talking about UTF-8 or Latin-9).
I probably do mean Latin-1.
>
> > Since Sun's jdk apparently doesn't have a problem with this, could gcj be
> > made to handle these characters too?
>
> gcj supports these characters, through the --encoding command line
> option. If that option is not specified, the locale's encoding is used.
> What encoding has your locale?
I've never touched the locale on my systems, so it's the default (LANG="C"?)
You're correct that it appears to build if I specify --encoding=ISO-8859-1 as
an argument to gcj. Unfortunately the transformation of the '-encoding'
argument is broken in the java wrapper script, so it needs fixing (patch
attached, the -encoding argument needs a '-' prepended).
However, there is still a minor problem in that running the 'java' wrapper
script picks a different default encoding to the default encoding of the jdk.
I gather the jdk picks its encoding from the environment as well, but I think
it chooses differently. Maybe the default should be ISO-8859-1 for the "C"
locale, not ASCII?
=)
Peter
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)
iD8DBQE+670qXjDfzL4R9DcRAvmkAKCLs65peEmTZplmE72zddyLCmYnsQCePv3g
wYUuzMvjxQZ/lZeARftGDU0=
=FuPf
-----END PGP SIGNATURE-----
--- /usr/bin/javac 2003-01-28 17:54:13.000000000 +1100
+++ javac 2003-06-15 10:21:20.000000000 +1000
@@ -52,7 +52,7 @@
$appendNextArg = '--classpath=';
} elsif ($arg eq '-encoding' or $arg eq '-bootclasspath' or
$arg eq '-extdirs') {
- $appendNextArg = $arg . '=';
+ $appendNextArg = "-". $arg . '=';
} elsif ($arg eq '-d') {
push @commandLine, '-d';
$copyNextArg = 1;
Reply to: