DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=36851>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ· INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=36851 Summary: <tar> Task does not support multi-byte file names Product: Ant Version: 1.5.4 Platform: PC OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: Core tasks AssignedTo: dev@ant.apache.org ReportedBy: [EMAIL PROTECTED] File names which contain multi-byte characters are not handled properly by the supporting classes of Ant's <tar> Task. These classes treat characters as bytes, which is not a valid assumption for non-ASCII characters (e.g. Japanese, Korean, Chinese, etc.). This problem was first noticed against the 1.5.4 release, but I've determined that it exists in today's HEAD, and has probably existed since Stefano/Conor first added this code. Steps to reproduce: =================== 1. Create a file whose name contains Japanese characters, encoded as UTF-8. 2. Invoke the <tar> task on that file, either programmatically or via a build.xml file, using the GNU tar long file names extension longfile="gnu". Observed behavior: ================== You're greated with the error message: Problem creating TAR: request to write '125' bytes exceeds size in header of '104' bytes Re-running Ant with -verbose/-debug will produce the following stack trace (using Ant 1.5.4): --- Nested Exception --- java.io.IOException: request to write '125' bytes exceeds size in header of '104' bytes at org.apache.tools.tar.TarOutputStream.write(TarOutputStream.java:274) at org.apache.tools.tar.TarOutputStream.write(TarOutputStream.java:256) at org.apache.tools.tar.TarOutputStream.putNextEntry(TarOutputStream.java:184) at org.apache.tools.ant.taskdefs.Tar.tarFile(Tar.java:410) at org.apache.tools.ant.taskdefs.Tar.execute(Tar.java:322) (I'll attach a patch against HEAD which shows a couple of the problem areas, but is untested.) Expected behavior: ================== As with GNU tar, archiving and unpacking of this data should be handled without error. Current work-around: ==================== Fork gtar from Ant. -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]