ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 8031] - [PATCH] Suggest ProjectHelperImpl use File.toURI().toURL().toExternalForm()
Date Sat, 06 Dec 2003 02:15:50 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8031>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8031

[PATCH] Suggest ProjectHelperImpl use File.toURI().toURL().toExternalForm()





------- Additional Comments From jglick@netbeans.org  2003-12-06 02:15 -------
BTW I've noticed that in Ant 1.6b3, if I try to run a build script contained in
a directory whose name contains UTF-8-encoded non-ASCII characters (on Linux:
locale en_US.UTF-8, glibc 2.3.2, kernel 2.4.20), it fails right away with an
ArrayIndexOutOfBoundsException (e.g. index 269) from FileUtils.toURI:

    if (isSpecial[c]) { <-- here

Ant 1.5.3 runs the same script just fine, and everything else in Java and in
fact the rest of my operating system deals with, and displays, the directory
correctly...

I presume the previously attached patch would solve this bug (on JDK 1.4),
though I haven't tried it.

A quick fix for Ant 1.6 might be to change this line to read:

    if (c < 256 && isSpecial[c]) {

which I think would at least pass through Unicode characters untouched, which
Java should be able to handle. The only special characters you really care about
- e.g. '#' or '?' - are in ASCII anyway.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message