Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8613459
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T04:52:51+00:00 2026-06-12T04:52:51+00:00

My first question. Please bear with me! I have an Ant task that need

  • 0

My first question. Please bear with me!

I have an Ant task that need to get some input from the user before proceeding. I use the Input task to achieve this. The input message will contain Swedish characters (eg å, ä and ö) but I am unable to get Ant to output the message properly. I’m testing this using the command line on a machine running Windows 7 Pro English (but obviously using a Swedish keyboard). Example:

<input message="åäö"/>

will output:

[input] Õõ÷

The build.xml is saved in UTF-8 format. If I do ‘chcp’ on the command line I get “Active code page: 850”.

The same result can be seen when doing an echo:

<echo message="åäö"/>

will output:

[echo] Õõ÷

But in the case of the echo task I’m able to do:

<echo encoding="850" message=åäö">

to get the expected output:

[echo] åäö

The input task does however not have an encoding attribute and I’d very much prefer to not have to define an encoding at all, especially not on a per-task level (since I can’t tell for sure on what machine the Ant script will be run from).

PS I have additional problems with the received input if it contains åäö and I set the input as a property that is later used in a filter copy task, but I guess that’s a whole other question

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T04:52:53+00:00Added an answer on June 12, 2026 at 4:52 am

    I can observe the issue on my Polish Windows.

    <script language="javascript">
      java.lang.System.out.println("default charset: "
      + java.nio.charset.Charset.defaultCharset());
    </script>
    

    reports default charset as “windows-1250” while the console operates at “iso-8859-2” (I guess so).

    Looks like <input> task uses the default charset thinking it would match the console input. In case it does not, I managed to override the encoding this way:

    set ANT_OPTS=-Dfile.encoding=iso-8859-2
    ant
    

    In your case I would try to force 850, as it looks like JRE defaults to something else.

    This question helped me to find the property name.

    It is also important where ant is run from. If I run it from my ide, jedit console plugin, I don’t need to override encoding, because I configured it to operate in windows-1250. So it seems to be another workaround, using an IDE.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

this is my first question, so please, bear with me. I have a Swing
First question from me; I'm currently fixing a graphing service that uses XSLFO to
This is my first question, so please bear with me. I am working on
This is my very first question on Stackoverflow, so please bear with me if
First off, please bear with the question as I am just starting out with
This is my first question asked here at stackoverflow, so bear with me please
This is my first question on stackoverflow, so please bear with me if I
This is my first question here so please bear with me - I apologise
Greetings everyone. This is my first question here at stackoverflow so please bear with
This is my first time asking a question in this website so please bear

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.