public inbox for java-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug java/14670] New: gcj & high ascii: win32: incorrectly translated / linux: fails to compile
@ 2004-03-21 16:15 ovidr at users dot sourceforge dot net
  2004-03-21 16:18 ` [Bug java/14670] " ovidr at users dot sourceforge dot net
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: ovidr at users dot sourceforge dot net @ 2004-03-21 16:15 UTC (permalink / raw)
  To: java-prs

On Linux: gcc version 3.4.0 20040131
TestD.java:12: error: unrecognized character in input stream.

On Win32: gcc version 3.4.0 20040316 (prerelease)
Compiles fine, but characters are either output as boxes or question marks.

The test app creates two labels (A and B)  The high bit ascii results when 
compiled:

1. All Sun's JAVA:

javac -classpath swt.jar TestD.java
java -classpath swt.jar;. TestD
A: OK
B: OK

2. Mixture of javac and GCJ.

javac -classpath swt.jar TestD.java
gcj -c TestD.class -I swt.jar
gcj --main=TestD TestD.o libswt.a

A: OK
B: Wrong. Has ?'s (question marks)

3. All GCJ.

gcj -c TestD.java -I swt.jar
gcj --main=TestD TestD.o libswt.a

A: Wrong. Has boxes.

I will attach the class to this message.

-- 
           Summary: gcj & high ascii: win32: incorrectly translated / linux:
                    fails to compile
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: java
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: ovidr at users dot sourceforge dot net
                CC: gcc-bugs at gcc dot gnu dot org,java-prs at gcc dot gnu
                    dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14670


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug java/14670] gcj & high ascii: win32: incorrectly translated / linux: fails to compile
  2004-03-21 16:15 [Bug java/14670] New: gcj & high ascii: win32: incorrectly translated / linux: fails to compile ovidr at users dot sourceforge dot net
@ 2004-03-21 16:18 ` ovidr at users dot sourceforge dot net
  2004-03-21 16:18 ` ovidr at users dot sourceforge dot net
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: ovidr at users dot sourceforge dot net @ 2004-03-21 16:18 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From ovidr at users dot sourceforge dot net  2004-03-21 16:18 -------
Created an attachment (id=5960)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=5960&action=view)
Sample .java class


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14670


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug java/14670] gcj & high ascii: win32: incorrectly translated / linux: fails to compile
  2004-03-21 16:15 [Bug java/14670] New: gcj & high ascii: win32: incorrectly translated / linux: fails to compile ovidr at users dot sourceforge dot net
  2004-03-21 16:18 ` [Bug java/14670] " ovidr at users dot sourceforge dot net
@ 2004-03-21 16:18 ` ovidr at users dot sourceforge dot net
  2004-03-21 16:37 ` pinskia at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: ovidr at users dot sourceforge dot net @ 2004-03-21 16:18 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From ovidr at users dot sourceforge dot net  2004-03-21 16:18 -------
Created an attachment (id=5961)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=5961&action=view)
Screenshot of win32 results.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14670


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug java/14670] gcj & high ascii: win32: incorrectly translated / linux: fails to compile
  2004-03-21 16:15 [Bug java/14670] New: gcj & high ascii: win32: incorrectly translated / linux: fails to compile ovidr at users dot sourceforge dot net
  2004-03-21 16:18 ` [Bug java/14670] " ovidr at users dot sourceforge dot net
  2004-03-21 16:18 ` ovidr at users dot sourceforge dot net
@ 2004-03-21 16:37 ` pinskia at gcc dot gnu dot org
  2004-03-21 17:25 ` ovidr at users dot sourceforge dot net
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-03-21 16:37 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-03-21 16:37 -------
does --encoding=UTF-8 help?

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|gcj & high ascii: win32:    |gcj & high ascii: win32:
                   |incorrectly translated /    |incorrectly translated /
                   |linux: fails to compile     |linux: fails to compile


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14670


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug java/14670] gcj & high ascii: win32: incorrectly translated / linux: fails to compile
  2004-03-21 16:15 [Bug java/14670] New: gcj & high ascii: win32: incorrectly translated / linux: fails to compile ovidr at users dot sourceforge dot net
                   ` (2 preceding siblings ...)
  2004-03-21 16:37 ` pinskia at gcc dot gnu dot org
@ 2004-03-21 17:25 ` ovidr at users dot sourceforge dot net
  2004-04-07  3:12 ` [Bug java/14670] [win32] gcj & high ascii: " pinskia at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: ovidr at users dot sourceforge dot net @ 2004-03-21 17:25 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From ovidr at users dot sourceforge dot net  2004-03-21 17:25 -------
No, it doesn't seem to make a difference. (win32 or linux)

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14670


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug java/14670] [win32] gcj & high ascii: incorrectly translated / linux: fails to compile
  2004-03-21 16:15 [Bug java/14670] New: gcj & high ascii: win32: incorrectly translated / linux: fails to compile ovidr at users dot sourceforge dot net
                   ` (3 preceding siblings ...)
  2004-03-21 17:25 ` ovidr at users dot sourceforge dot net
@ 2004-04-07  3:12 ` pinskia at gcc dot gnu dot org
  2004-04-07  3:12 ` pinskia at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-04-07  3:12 UTC (permalink / raw)
  To: java-prs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|gcj & high ascii: win32:    |[win32] gcj & high ascii:
                   |incorrectly translated /    |incorrectly translated /
                   |linux: fails to compile     |linux: fails to compile


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14670


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug java/14670] [win32] gcj & high ascii: incorrectly translated / linux: fails to compile
  2004-03-21 16:15 [Bug java/14670] New: gcj & high ascii: win32: incorrectly translated / linux: fails to compile ovidr at users dot sourceforge dot net
                   ` (4 preceding siblings ...)
  2004-04-07  3:12 ` [Bug java/14670] [win32] gcj & high ascii: " pinskia at gcc dot gnu dot org
@ 2004-04-07  3:12 ` pinskia at gcc dot gnu dot org
  2004-12-12 21:33 ` [Bug libgcj/14670] " pinskia at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-04-07  3:12 UTC (permalink / raw)
  To: java-prs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
            Version|unknown                     |3.4.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14670


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug libgcj/14670] [win32] gcj & high ascii: incorrectly translated / linux: fails to compile
  2004-03-21 16:15 [Bug java/14670] New: gcj & high ascii: win32: incorrectly translated / linux: fails to compile ovidr at users dot sourceforge dot net
                   ` (5 preceding siblings ...)
  2004-04-07  3:12 ` pinskia at gcc dot gnu dot org
@ 2004-12-12 21:33 ` pinskia at gcc dot gnu dot org
  2004-12-12 21:34 ` pinskia at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-12-12 21:33 UTC (permalink / raw)
  To: java-prs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|java                        |libgcj


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14670


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug libgcj/14670] [win32] gcj & high ascii: incorrectly translated / linux: fails to compile
  2004-03-21 16:15 [Bug java/14670] New: gcj & high ascii: win32: incorrectly translated / linux: fails to compile ovidr at users dot sourceforge dot net
                   ` (6 preceding siblings ...)
  2004-12-12 21:33 ` [Bug libgcj/14670] " pinskia at gcc dot gnu dot org
@ 2004-12-12 21:34 ` pinskia at gcc dot gnu dot org
  2004-12-14 20:13 ` tromey at gcc dot gnu dot org
  2004-12-15  4:59 ` ovidr at users dot sourceforge dot net
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-12-12 21:34 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-12-12 21:34 -------
*** Bug 13892 has been marked as a duplicate of this bug. ***

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |oyvind dot harboe at zylin
                   |                            |dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14670


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug libgcj/14670] [win32] gcj & high ascii: incorrectly translated / linux: fails to compile
  2004-03-21 16:15 [Bug java/14670] New: gcj & high ascii: win32: incorrectly translated / linux: fails to compile ovidr at users dot sourceforge dot net
                   ` (7 preceding siblings ...)
  2004-12-12 21:34 ` pinskia at gcc dot gnu dot org
@ 2004-12-14 20:13 ` tromey at gcc dot gnu dot org
  2004-12-15  4:59 ` ovidr at users dot sourceforge dot net
  9 siblings, 0 replies; 11+ messages in thread
From: tromey at gcc dot gnu dot org @ 2004-12-14 20:13 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From tromey at gcc dot gnu dot org  2004-12-14 20:13 -------
If by "high ascii" you mean byte with the high bit
set, then you want to compile those with "--encoding ISO-8859-1"
or the like.

Whether this works on Windows, I don't know.  It depends on
whether iconv is available on that platform (or if you are
using libiconv)

What happens if you compile with "gcj -C" and then run the
resulting bytecode using Sun's "java"?  If this works, then the
problem is not in the compiler at all but is in the runtime's
choice of default character set.



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14670


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug libgcj/14670] [win32] gcj & high ascii: incorrectly translated / linux: fails to compile
  2004-03-21 16:15 [Bug java/14670] New: gcj & high ascii: win32: incorrectly translated / linux: fails to compile ovidr at users dot sourceforge dot net
                   ` (8 preceding siblings ...)
  2004-12-14 20:13 ` tromey at gcc dot gnu dot org
@ 2004-12-15  4:59 ` ovidr at users dot sourceforge dot net
  9 siblings, 0 replies; 11+ messages in thread
From: ovidr at users dot sourceforge dot net @ 2004-12-15  4:59 UTC (permalink / raw)
  To: java-prs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1380 bytes --]


------- Additional Comments From ovidr at users dot sourceforge dot net  2004-12-15 04:59 -------
It isn't a compiling problem that I'm trying to illustrate.  TestD.java
(included above) has a line: String s = "<high ascii chars>" characters.    If
these characters were received over a network connection as a byte stream, they
would still be converted to a string via the "new String(byte[])" method, which
is used in TestD.java.

They would then be turned into a String, and displayed, as in the screenshot
attached above.  gcj doesn't seem to convert the characters properly (not in the
same was a sun's java anyway).   The testcase and screenshot hopefully
communicate what I mean.

Anyway, compiling to bytecode is separate issue:
gcc version 4.0.0 20041213 (experimental)
gcj -C --encoding=UTF-8 TestD.java
TestD.java:12: error: malformed UTF-8 character.
         String s = "&#9617;ñâRÇÇNÇåñ&#9617;";

gcj -C --encoding=ISO-8859-1 TestD.java
TestD.java:1: fatal error: unknown encoding: 'ISO-8859-1'
   This might mean that your locale's encoding is not supported
   by your system's iconv(3) implementation.  If you aren't trying
   to use a particular encoding for your input file, try the
   '--encoding=UTF-8' option
compilation terminated.

I have mingw msys iconv (GNU libiconv 1.8) on my system. 


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14670


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2004-12-15  4:59 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-03-21 16:15 [Bug java/14670] New: gcj & high ascii: win32: incorrectly translated / linux: fails to compile ovidr at users dot sourceforge dot net
2004-03-21 16:18 ` [Bug java/14670] " ovidr at users dot sourceforge dot net
2004-03-21 16:18 ` ovidr at users dot sourceforge dot net
2004-03-21 16:37 ` pinskia at gcc dot gnu dot org
2004-03-21 17:25 ` ovidr at users dot sourceforge dot net
2004-04-07  3:12 ` [Bug java/14670] [win32] gcj & high ascii: " pinskia at gcc dot gnu dot org
2004-04-07  3:12 ` pinskia at gcc dot gnu dot org
2004-12-12 21:33 ` [Bug libgcj/14670] " pinskia at gcc dot gnu dot org
2004-12-12 21:34 ` pinskia at gcc dot gnu dot org
2004-12-14 20:13 ` tromey at gcc dot gnu dot org
2004-12-15  4:59 ` ovidr at users dot sourceforge dot net

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).