Ant: Malformed \ uxxxx encoding in filefile task

I get the error below using the Ant skript that I wrote.

I have already done some search queries and found out that the problem is with the lines containing \ u, what is happening under Windows due to the directory delimiter. I changed all this to /, but the error remains.

There are no remaining lines in my script.

java.lang.IllegalArgumentException: Malformed \uxxxx encoding. 

An error occurred while executing the propertyfile task, so I looked at the file I want to change. This, on the other hand, contains several lines. The file is not related to Ant, although it is a borland (xml) project file that contains one line, for example [someParameter] = [someValue].

I just want to increase [someValue] by 1.

So my question is:

Can the properties file I want to change cause the mentioned error

and if the answer is yes,

What can I do, except by performing it with a regular expression task (for example, finding a string, propertyregex-ing value, math + 1 value and regex-replacing value)

+4
source share
2 answers

I know this question was asked a while ago, but I came across it without an answer, on another site that I found ( http://www.coderanch.com/t/107014/tools/Malformed-uxxxx-encoding-error ) I found that this can happen when instead of "\" for assigning files you should use "/" because of how parsing works / I hope this helps.

+17
source

first you should try running an ant script with a debug flag to determine which file is causing the problem in Eclipse you do this by going to

 Run > External Tools > External Tools Configurations... > Main 

and adding "-d" (without quotation marks) to the "Arguments"

then try editing the file in Eclipse , as some editors (for example, "Wordpad") may corrupt the file

0
source

Source: https://habr.com/ru/post/1485599/


All Articles