Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Delete task failed to remove French file name

Status
Not open for further replies.

Babas1

Programmer
Feb 9, 2006
2
LU
Hi all,
As you know, french language includes some stressed characters like é, à, etc
I have a file called "BD_Modèle.sql" in a "src" folder.

I use Ant 1.6.5 on Unix and the task <delete dir="src"/> fails saying :
Unable to delete file /export/home/wasapps/src/BD_Mod?le.sql
at org.apache.tools.ant.taskdefs.Delete.removeDir(Delete.java:594)
at org.apache.tools.ant.taskdefs.Delete.removeDir(Delete.java:587)

Could anyone hep me ?
 
On the face of it, it looks as if Ant is using a non-Unicode encoding for filenames. I've done a little digging and there is an ant property you can use to alter its file encoding.

Code:
<property name="file.encoding" value="[b][i]Your encoding[/i][/b]"/>

You'd need to specify the Unicode encoding which contains the French accented characters.

I haven't tried this but it's worth a try.

Tim
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top