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

  • Home
  • SEARCH
  • 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 6621355
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T21:15:11+00:00 2026-05-25T21:15:11+00:00

UTF-8 is broken on .html files served through tomcat through /web-app. If I open

  • 0

UTF-8 is broken on .html files served through tomcat through /web-app. If I open the file directly with file:///, it renders fine. If I view the file during run-app, it looks fine. However, when I’m deployed as a war, UTF-8 characters appear garbled.

The content-type of the response seems correct…
Content-Type: text/html;charset=UTF-8, and the HTML file itself even seems to have the correct meta declarations.

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>

Tomcat’s connector is set to “UTF-8” for default URIEncoding, so I don’t think that’s the issue either. GSPs are rendering fine; only the HTML file has an issue.

What could be going on here?

EDIT:
Using firefox, I saved a local copy of the raw HTML file and the file read directly from file:///... for comparison. The only difference between the files is that the Tomcat version has all non-ascii characters replaced with this:

�

Which either renders as an empty square or question mark depending on what editor you’re using. The character itself seems to be EF BF BD, which replaces all the non-ascii characters. Somehow, in serving a file, tomcat or grails is just stomping on the unicode bytes. What could do that?

EDIT EDIT:
Even this w3 test file has the same behavior as my files, indicating that my files are probably fine, and there really is something up with Tomcat/Grails.

  • 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-25T21:15:12+00:00Added an answer on May 25, 2026 at 9:15 pm

    Grails 1.3.7, at least, cannot serve HTML files correctly. Write your own file server controller.

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

Sidebar

Related Questions

Basically I have a web site that renders HTML preview of some documents (mainly
I am having utf-8 encoded file containing arabic text and I have to search
I have a file UTF-8 encoding in windows, and when i use it under
I have an UTF-8 encoded txt file and I want to import it to
I've got broken data.xml file, how i can fix it with php? I need
I have a Unicode (UTF-8 without BOM) text file within a jar, that's loaded
I am loading a HTML from an external server. The HTML markup has UTF-8
I have a simple html doc with a flex app and an iframe side-by-side
I'm running Ruby 1.9.2 and trying to fix some broken UTF-8 text input where
Flex uses by default UTF-8. I have not fount a way to specify a

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.