Grokbase Groups Ant user June 2013
FAQ
Dear Ant-users,

I get the error below with an Ant skript I wrote.

I already did some googling and found out, that the problem lies with
strings containing \u, which happens under Windows because of the directory
separator. I changed all those to / but the error remains.

There are definitely no remaining \u strings in my script.

java.lang.IllegalArgumentException: Malformed \uxxxx encoding.

The error occurs when executing the propertyfile task, so I examined the
file I want to change. This on the other hand contains multiple \u strings.
The file has no relation to ant though, it's a borland project file (xml)
which contains one line like [someParameter]=[someValue].

I just want to increase [someValue] by 1.

So my question is:

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

and if the answer is "yes",

What can I do, *other than* doing it with a regex task (like finding the
line, propertyregex-ing the value, math+1 the value and regex-replacing the
value)

Unfortunately I have no influence on the property file, other than the
mentioned value.


regards,

Michael

Search Discussions

  • Peter West at Jun 12, 2013 at 12:56 am
    Hello Michael,

    As far as I know, you can't edit arbitrary files with the propertyfile task. The files have to be valid Java property files. For the restrictions on property files, see java.util.Properties load(Reader reader) at http://docs.oracle.com/javase/7/docs/api/

    Peter West

    "And all ate and were satisfied."
    On 11/06/2013, at 11:30 PM, Michael Niemand wrote:

    Dear Ant-users,

    I get the error below with an Ant skript I wrote.

    I already did some googling and found out, that the problem lies with
    strings containing \u, which happens under Windows because of the directory
    separator. I changed all those to / but the error remains.

    There are definitely no remaining \u strings in my script.

    java.lang.IllegalArgumentException: Malformed \uxxxx encoding.

    The error occurs when executing the propertyfile task, so I examined the
    file I want to change. This on the other hand contains multiple \u strings.
    The file has no relation to ant though, it's a borland project file (xml)
    which contains one line like [someParameter]=[someValue].

    I just want to increase [someValue] by 1.

    So my question is:

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

    and if the answer is "yes",

    What can I do, *other than* doing it with a regex task (like finding the
    line, propertyregex-ing the value, math+1 the value and regex-replacing the
    value)

    Unfortunately I have no influence on the property file, other than the
    mentioned value.


    regards,

    Michael

    ---------------------------------------------------------------------
    To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
    For additional commands, e-mail: user-help@ant.apache.org
  • Michael Niemand at Jun 18, 2013 at 11:06 am
    Thanks Peter. I did it with a replaceregex task now.

    On Wed, Jun 12, 2013 at 2:55 AM, Peter West wrote:

    Hello Michael,

    As far as I know, you can't edit arbitrary files with the propertyfile
    task. The files have to be valid Java property files. For the restrictions
    on property files, see java.util.Properties load(Reader reader) at
    http://docs.oracle.com/javase/7/docs/api/

    Peter West

    "And all ate and were satisfied."
    On 11/06/2013, at 11:30 PM, Michael Niemand wrote:

    Dear Ant-users,

    I get the error below with an Ant skript I wrote.

    I already did some googling and found out, that the problem lies with
    strings containing \u, which happens under Windows because of the directory
    separator. I changed all those to / but the error remains.

    There are definitely no remaining \u strings in my script.

    java.lang.IllegalArgumentException: Malformed \uxxxx encoding.

    The error occurs when executing the propertyfile task, so I examined the
    file I want to change. This on the other hand contains multiple \u strings.
    The file has no relation to ant though, it's a borland project file (xml)
    which contains one line like [someParameter]=[someValue].

    I just want to increase [someValue] by 1.

    So my question is:

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

    and if the answer is "yes",

    What can I do, *other than* doing it with a regex task (like finding the
    line, propertyregex-ing the value, math+1 the value and regex-replacing the
    value)

    Unfortunately I have no influence on the property file, other than the
    mentioned value.


    regards,

    Michael

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

    --
    Dipl.-Ing. (FH) *Michael Niemand**
    *
    Albusstr. 17
    60313 Frankfurt/M
    Germany

    Tel.: +49 (0) 69 200 130 60
    Mobile: +49 (0) 171 645 29 07

    eMail: michael.niemand@gmail.com
    sip:1406283@sipgate.de

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupuser @
categoriesant
postedJun 11, '13 at 1:31p
activeJun 18, '13 at 11:06a
posts3
users2
websiteant.apache.org

2 users in discussion

Michael Niemand: 2 posts Peter West: 1 post

People

Translate

site design / logo © 2018 Grokbase