Bug 238532 - [compiler] Console output stops with error "warning: unmappable character for encoding UTF8"
Summary: [compiler] Console output stops with error "warning: unmappable character for...
Status: CLOSED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Ant (show other bugs)
Version: 3.4   Edit
Hardware: PC Windows XP
: P3 normal with 4 votes (vote)
Target Milestone: ---   Edit
Assignee: Platform-Ant-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords: needinfo
: 255697 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-06-26 04:35 EDT by Adelino Rodrigues CLA
Modified: 2021-11-21 17:49 EST (History)
10 users (show)

See Also:


Attachments
Console output stops (22.99 KB, image/png)
2008-06-26 04:39 EDT, Adelino Rodrigues CLA
no flags Details
Source file of class that stops the console output (10.74 KB, text/plain)
2008-06-26 04:45 EDT, Adelino Rodrigues CLA
no flags Details
eclipsebug238532.zip : a failed attempt to reproduce issue (3.45 KB, application/x-zip-compressed)
2008-08-22 05:19 EDT, Adelino Rodrigues CLA
no flags Details
build.xml : the ant script of the project that stops the console output (21.47 KB, text/xml)
2008-08-22 05:21 EDT, Adelino Rodrigues CLA
no flags Details
Short build.xml exposing the bug (118 bytes, text/xml)
2008-12-17 04:19 EST, Michael Piefel CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Adelino Rodrigues CLA 2008-06-26 04:35:17 EDT
This issue was not present in the 3.3 release. 

The issue comes when compiling a class having on line 98, the following comment:
			//... et voilà

The console showing the output from the ANT build stops with the following message, but the ANT build proceeds and ends successfully. The rest of the console output is lost.

compileEJB:
     [echo] Compiling EJB source code...
    [mkdir] Created dir: D:\rodrigues\project\mms\deploy\mmse\expanded\mmse-EJB.jar
    [javac] Compiling 32 source files to D:\rodrigues\project\mms\deploy\mmse\expanded\mmse-EJB.jar
    [javac] D:\rodrigues\project\mms\eu.emea.mmse\src\ejb\eu\emea\mmse\ejb\hotel\IocHotelDAO.java:98: warning: unmappable character for encoding UTF8
Comment 1 Adelino Rodrigues CLA 2008-06-26 04:39:03 EDT
Created attachment 105864 [details]
Console output stops
Comment 2 Adelino Rodrigues CLA 2008-06-26 04:45:38 EDT
Created attachment 105866 [details]
Source file of class that stops the console output
Comment 3 Darin Wright CLA 2008-06-26 09:25:24 EDT
Moving to JCORE, this is a compilation task that is failing.
Comment 4 Kent Johnson CLA 2008-07-08 12:25:56 EDT
Olivier can you take a look please.

Possible 3.4.1 issue
Comment 5 Olivier Thomann CLA 2008-07-16 12:53:55 EDT
Could you please provide your ant build script?
Comment 6 Adelino Rodrigues CLA 2008-08-22 05:16:58 EDT
Sorry for not replying earlier: I was busy in July and then on Holiday until yesterday.

I tried to reproduce the bug on a new project but I failed: the project compiles successfully although it contains some accents in comments. See the project eclipsebug238532.zip . 

I include the Ant script of the project that fails to compile with ant.
Comment 7 Adelino Rodrigues CLA 2008-08-22 05:19:57 EDT
Created attachment 110657 [details]
eclipsebug238532.zip : a failed attempt to reproduce issue

This is a one class project with accents in comments. The compilation is successful unlike the original project for which the bug was submitted.
Comment 8 Adelino Rodrigues CLA 2008-08-22 05:21:32 EDT
Created attachment 110658 [details]
build.xml : the ant script of the project that stops the console output
Comment 9 Helmut CLA 2008-08-27 12:00:41 EDT
I have the same problem and my experience is exactly the same. 

> This is a one class project with accents in comments. The compilation is
> successful unlike the original project for which the bug was submitted.

The problem isn't bound to a concert repeatable line of ant script code. Running my complex ant script several times the Ganymede console stopped on different lines of ant code. It was always a line of code witch produces some output like warnings, echos, errors, etc.

A simple ant script seams to work always.
Comment 10 Philipe Mulet CLA 2008-08-28 04:57:25 EDT
Likely to late for 3.4.1 (we are in RC1 stage).
Comment 11 Olivier Thomann CLA 2008-09-09 15:01:21 EDT
(In reply to comment #8)
> Created an attachment (id=110658) [details]
> build.xml : the ant script of the project that stops the console output
You see this issue and you don't set the compiler to be the Eclipse compiler inside the ant task.
I don't see how this could be related to the eclipse compiler.

Comment 12 Adelino Rodrigues CLA 2008-09-09 17:22:03 EDT
(In reply to comment #11)
Who told you that the issue is with the eclipse compiler?

When reporting the issue, I categorized it as UI related, since text stops going to the console while the ant job still runs successfully in the background.

The attached ANT runs fine on exactly the same box (Intel with Windows XP) with Eclipse Europa.

On my laptop (Intel with Vista) the attached ANT runs fine on Eclipse Ganymede too.
Comment 13 Helmut CLA 2008-09-10 02:53:51 EDT
(In reply to comment #12)

You are right IMHO it is definitely not the compiler. Same ant script, same setup, same compiler and Eclipse Europe did it and Ganymede failed. That is my experience too.

Comment 14 Olivier Thomann CLA 2008-09-18 09:41:53 EDT
Moving to Platform/Ant for further investigation.
Comment 15 Stefan Wichmann CLA 2008-09-22 16:36:05 EDT
I can report the same problem.

A few details that might help to track down the bug:
We are working with version 3.4 of eclipse on Windows XP. All source files are encoded in Cp1252. Running the ant script inside the windows console works fine and even using an external tools configuration works. In the later case the console is configured to use Cp1252 encoding.

When using an ant cofiguration the script breaks on some special characters. Since the ant console can't be run in CP1252 encoding i can't verify that this might be the problem...

As a little difference to the original report, the build stops shortly after the error message appears inside the console. It doesn't end successfully.
Comment 16 Nixskut CLA 2008-10-20 10:37:17 EDT
(In reply to comment #0)
> This issue was not present in the 3.3 release. 
> 
> The issue comes when compiling a class having on line 98, the following
> comment:
>                         //... et voilà
> 
> The console showing the output from the ANT build stops with the following
> message, but the ANT build proceeds and ends successfully. The rest of the
> console output is lost.
> 
> compileEJB:
>      [echo] Compiling EJB source code...
>     [mkdir] Created dir:
> D:\rodrigues\project\mms\deploy\mmse\expanded\mmse-EJB.jar
>     [javac] Compiling 32 source files to
> D:\rodrigues\project\mms\deploy\mmse\expanded\mmse-EJB.jar
>     [javac]
> D:\rodrigues\project\mms\eu.emea.mmse\src\ejb\eu\emea\mmse\ejb\hotel\IocHotelDAO.java:98:
> warning: unmappable character for encoding UTF8
> 

Since 3.4 the "ANT Run Dialog"->"Common"->"Console Encoding" seems to be taken from the XML-Declaration in the build.xml, not the "Eclipse Default Encoding". We had the problem with our build.xml's that started with <?xml version="1.0" encoding="UTF-8"?>, while our "Eclipse Default-Encoding" is cp1252, so ANT terminated(!) after the first "unmappable character"-warning. In 3.3 
the "Console Encoding" was "cp1252", no matter what encoding was given in the XML-Declaration. 
No problems with build.xml's with <?xml version="1.0" encoding="ISO-8859-1"?> or after setting the "Console Encoding" in the "ANT Run Dialog"->"Common" to "cp1252"
Comment 17 Adelino Rodrigues CLA 2008-10-21 03:34:46 EDT
Many thanks for that very helpful comment: you are putting the finger on the source of the issue.

Following your instructions, I changed in Run/External tools/External Tools Configurations/Ant Build/my ant build.xml, under the Common tab, the option for Console encoding from "Default - inherited (UTF-8)" to Other ISO-8859-1

The ant script runs fines and the console displays everything without stopping with the unmappable character error.
Comment 18 Michael Piefel CLA 2008-12-17 04:19:14 EST
Created attachment 120671 [details]
Short build.xml exposing the bug

This is a short Ant build script exposing the bug. When run in a console set to UTF-8 encoding, only the first echo will produce output. The script continues to run, only outupt stops.
Comment 19 Darin Wright CLA 2008-12-17 09:45:46 EST
Running the example, I see this stack trace in the system console:

java.lang.NumberFormatException: For input string: ",20"
	at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
	at java.lang.Integer.parseInt(Integer.java:468)
	at java.lang.Integer.parseInt(Integer.java:518)
	at org.eclipse.ant.internal.ui.launchConfigurations.RemoteAntBuildListener.receiveTaskMessage(RemoteAntBuildListener.java:243)
	at org.eclipse.ant.internal.ui.launchConfigurations.RemoteAntBuildListener.receiveMessage(RemoteAntBuildListener.java:163)
	at org.eclipse.ant.internal.ui.launchConfigurations.RemoteAntBuildListener$ServerConnection.run(RemoteAntBuildListener.java:99)
Comment 20 Darin Wright CLA 2008-12-17 09:52:01 EST
*** Bug 255697 has been marked as a duplicate of this bug. ***
Comment 21 Eclipse Webmaster CLA 2019-09-06 16:06:05 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.
Comment 22 Eclipse Genie CLA 2021-11-21 17:49:30 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.