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 3482062
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T10:30:57+00:00 2026-05-18T10:30:57+00:00

Somehow I can’t get my UTF-8 sources to play nice with Ant. I get

  • 0

Somehow I can’t get my UTF-8 sources to play nice with Ant.

I get a whole lot of “warning: unmappable character for encoding ascii”. I’m going crazy, really. Hours and hours and hours. Btw, I noticed 5 people already used the tag crazy. 🙂

And yes, I’ve read this, this and others. Google also (the first 5 page results of at least 3 or 4 different searches, at least). There are javac options. I’ve tried. There is also some preset or something (sorry, 3 AM). Didn’t work either.

I’m generating Android apk files with Ant. I can’t use Eclipse, so no. And by the way, the ant documentation is gibberish to me. Those examples are of no use at all. I’ve lost count on how much I’ve tried.

I’ve tried using the Dfile.encoding option, tried mixing that with CHCP 65001 Windows command. Did all the combinations, and it even makes Ant (Javac I guess) stop spitting errors, but it still doesn’t matter. My code still ends up with garbage carachters (a bunch of ?? instead of á, í etc).

  • 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-05-18T10:30:58+00:00Added an answer on May 18, 2026 at 10:30 am

    To all you who use UTF-8 source files on Windows and was trying to build Android packages with Proguard using the famous blog post by Dan Galpin/Tim Bray.

    This encoding problem happens with javac (thanks for the tip, JesperE). However, I was unable to create a new javac rule on my project’s files, because of needed parameters that I didn’t know anything about. So here is the easy answer (probably not the only answer):

    1. Try the usual “ant release” command.
    2. Notice that, on the start, there is an output talking about some imported ANT rules. Right on the start you will see some [setup] rules. Look for this one:

      [setup] Importing rules file: tools\ant\ant_rules_r3.xml

    3. Find that file and open it. Search for “javac encoding”. You will see that is set to “ascii”. Change to “UTF-8”.

    4. Do the “ant release” again and it will be fine.

    That’s how I did here. I’m sure there is a way to override this on a per-project basis. But it kept giving me errors on mandatory parameters, as I said. So for me at least it was that much easier doing this way. Besides, I only work with UTF-8 anyway.

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

Sidebar

Related Questions

I've been working all day and I somehow can't get this probably easy task
Can I get somehow(from a database or other source) a percentage of the phones
Somehow I can't seem to get string replacement within a foreach loop in C#
Somehow I can't get the iframe mode to work in the following code The
Somehow I can't manage to get an imageview to be on top of a
Somehow I can't get Glew in multiple header files. It is just complaining about
I somehow can't get this to work. I want at least one name but
I am trying something very simple but somehow I can't get it to work.
I'm busy implementing the wurfl api using PHP, but somehow just can't seem to
Can I somehow disable ListView items navigation through keyboard (arrow keys), and leave navigation

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.