This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 14842 - Character conversion error running ant scripts
Summary: Character conversion error running ant scripts
Status: CLOSED DUPLICATE of bug 16102
Alias: None
Product: projects
Classification: Unclassified
Component: Ant (show other bugs)
Version: 3.x
Hardware: PC Windows ME/2000
: P3 blocker (vote)
Assignee: Jesse Glick
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-08-27 23:13 UTC by aaronk
Modified: 2003-06-30 14:46 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description aaronk 2001-08-27 23:13:08 UTC
After editing an Ant script using Netbeans, I occasionally get the following 
error when trying to run the script from the command line (out side of NB).

C:\development\OrderWareWebapp\HEAD\build.xml:1: Character conversion 
error: "Unconvertible UTF-8 character beginning with 0xa9" (line number may be 
too low).

The script does run perfectly from within netbeans (apart from one other bug, 
which I will enter separately).

I believe this is a NetBeans bug, not an Ant bug, as I use Ant constantly and 
have never encountered this problem unless I have edited the script with 
netbeans.
Comment 1 aaronk 2001-08-28 00:02:18 UTC
Ah ha!  The specific problem is that when I cut and paste from an 
existing build script, to a new one, the '©' character is 
converted to the unicode version.  i.e. The '©' character 
disappears from the file, and is replaced with an invisible 0xb8 
(ASCII) character!

I think this is not an Ant module issue, but rather an editor issue.  
I will reassign this to the editor module.
Comment 2 aaronk 2001-08-28 02:31:51 UTC
I would appear that this bug is not consistent.  I just did another 
cut/paste from one build file to another and the © stayed as it 
was.

Great - an intermittent bug.

Good luck guys.

:-)
Comment 3 aaronk 2001-08-28 23:11:35 UTC
A further development - the error appears not to happen during cut 
and paste, but during some sort of code reformat in my ant script.

I opened my script this morning, to find that the © had turned 
into a copyright symbol in one of my scripts.  (The copyright symbol 
was actually visible in the editor - last time it was invisible.)  
The tag that this symbol appears in used to be formatted with each 
attribute on a separate line, but it had been reformatted all onto 
one line.

I am not really sure when netbeans is performing this reformat.
Comment 4 Jan Lahoda 2001-10-08 12:56:19 UTC
Ant modules folks, could you please have a look on this? I can not
understand how editor module could do such thing. Reassign it back if
you think editor is on shame.
Comment 5 Jesse Glick 2001-10-08 14:46:08 UTC
I believe this is a duplicate of issue #16102, though if you disagree
of course reopen it. My guess would be that the problem occurs after
you perform some kind of edit to the script using the Explorer, in
which case it resets the encoding to UTF-8 which is problematic
because it does not really understand your original XML encoding
declaration (nor does the editor). I'm not sure if there's any
straightforward fix in the current Ant codebase; this kind of problem
is definitely fixable using better generic XML editing (which is under
development but not ready for reuse yet). I doubt the source editor
itself is at fault here because it presumably deals with Unicode
characters not with the raw file encoding.

*** This issue has been marked as a duplicate of 16102 ***
Comment 6 Quality Engineering 2003-06-30 14:44:31 UTC
Resolved for 3.3.x or earlier, no new info since then -> closing.

Comment 7 Quality Engineering 2003-06-30 14:46:15 UTC
Resolved for 3.3.x or earlier, no new info since then -> closing.