Bug 13892 - [win32] UTF8 encoding problem/JRE incompatiblity w/small testcase
Summary: [win32] UTF8 encoding problem/JRE incompatiblity w/small testcase
Status: RESOLVED DUPLICATE of bug 14670
Alias: None
Product: gcc
Classification: Unclassified
Component: libgcj (show other bugs)
Version: unknown
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-01-28 09:25 UTC by oyvind.harboe
Modified: 2005-07-23 22:49 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments
The .jar's required (296.26 KB, application/octet-stream)
2004-01-28 17:51 UTC, oyvind.harboe
Details
This is the test application source (2.04 KB, application/x-zip-compressed)
2004-02-10 21:01 UTC, oyvind.harboe
Details
Started test app afresh (297.64 KB, application/x-zip-compressed)
2004-02-10 21:10 UTC, oyvind.harboe
Details

Note You need to log in before you can comment on or make changes to this bug.
Description oyvind.harboe 2004-01-28 09:25:29 UTC
In the thread below, the problem is discussed. 

Short story: base64 UTF8 encoding is somehow garbled when run under GIJ.


http://mail.gnu.org/archive/html/classpathx-discuss/2004-01/msg00025.html


Øyvind
Comment 1 oyvind.harboe 2004-01-28 17:51:13 UTC
Created attachment 5601 [details]
The .jar's required

I recommend getting these jars from GNU Classpath/Classpathx, but here they are
just in case.
Comment 2 oyvind.harboe 2004-02-06 09:54:18 UTC
Correction of first comment: this problem happens with GCJ. I have not tested 
with GIJ.

Extract from mailing list discussion follows:

Attached is a small case to reproduce the problem.

To compile:

\wingcc\bin\gcj -c -o javax-security.o javax-security.jar
\wingcc\bin\gcj -c -o inetlib.o --classpath jsse.jar;javax-security.jar  
inetlib.jar
\wingcc\bin\gcj -c -o gnumail.o --classpath inetlib.jar;activation.jar  
gnumail.jar
\wingcc\bin\gcj -c -o activation.o activation.jar 
\wingcc\bin\gcj -c -o smtp.o --classpath gnumail.jar;inetlib.jar smtp.jar
\wingcc\bin\gcj -c -o jsse.o jsse.jar
\wingcc\bin\gcj -c -o send.o Send.java --classpath gnumail.jar
\wingcc\bin\gcj -c -o dummy.o Dummy.java 
\wingcc\bin\gcj -s -o send.exe activation.o gnumail.o inetlib.o smtp.o jsse.o 
send.o dummy.o javax-security.o --main=Send


To test:


c:\temp\foo> send mysmtp.sever.com sender@bogus.example.com 
receiver@bogus.example.com


Comment 3 oyvind.harboe 2004-02-06 09:55:17 UTC
Tom Tromey from RedHat wrote:


Hmm, that sounds frightening, what with us so close to a release.

The \0 seems to occur every 200 characters.  That's suggestive... look
around for a 200 char or byte buffer and then look in that area for
bugs.

It would help if you could reproduce this in a less complex
environment.  E.g. by duplicating your I/O paths in a small program
and then feeding it some predefined text file.

Tom


Comment 4 oyvind.harboe 2004-02-10 21:01:48 UTC
Created attachment 5716 [details]
This is the test application source
Comment 5 oyvind.harboe 2004-02-10 21:10:44 UTC
Created attachment 5717 [details]
Started test app afresh

I attached the wrong files. 

Starting afresh with a complete .zip of everything that is needed.

- place Mohans latest build in \wingcc
- unzip smalltestapp
- compile.cmd
- send mysmtp.sever.com sender@bogus.example.com receiver@bogus.example.com

The message will contain �

Øyvind
Comment 6 oyvind.harboe 2004-02-10 21:18:07 UTC
GIJ Doesn't work either.

\wingcc\bin\gij -cp java-security.jar;inetlib.jar;activation.jar;smt
p.jar;gnumail.jar;jsse.jar;. Send mysmtp.sever.com sender@bogus.example.com 
receiver@bogus.example.com

W/Suns JRE it works fine and there is no � in the message.

java -cp java-
security.jar;inetlib.jar;activation.jar;smtp.jar;gnumail.jar;jsse.jar;. Send  
mail.broadpark.no oyvind.harboe@zylin.com oharboe@broadpark.no

Comment 7 Andrew Pinski 2004-12-12 21:34:02 UTC

*** This bug has been marked as a duplicate of 14670 ***