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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T08:08:15+00:00 2026-06-18T08:08:15+00:00

I have a problem with encoding strings in RESTeasy. The problem is that chinese

  • 0

I have a problem with encoding strings in RESTeasy. The problem is that chinese alphabet or any other non-latin characters are not displayed properly. If I try to print them out (or send as response) I get “?????” instead.
I believe that default encoding in RESTeasy is us-ascii. Do you know how to change it to UTF-8? Maybe there is another solution to this problem?

Here is a short passage from my code:

@POST
@Path("post")
@Consumes(MediaType.MULTIPART_FORM_DATA)
public String uploadData(@MultipartForm DataUploadForm uploadForm) {

...

//the code below is just for the purpose of presentation

String text = "some non-latin alphabet signs here"
System.out.println(text);  // "??????" is printed out

return text; //"??????" is returned
}

My resteasy-jaxrs-3.0-beta-2 is running on Tomcat 7.0.

Thank you!

  • 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-18T08:08:16+00:00Added an answer on June 18, 2026 at 8:08 am

    This is not about resteasy or jax-rs mate.

    Check this post

    There are several things you may want to look into:

    1. If the data is from DB, then you need to make sure data in DB it is encoded correctly.
    2. Your JVM environment is encoding using utf8
    3. It could be an issue of IDE, because IDE and your tomcat might running on different
      configurations.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I think I have an encoding problem that needs to be fixed. Is there
I have an external module, that is returning me some strings. I am not
Here's the problem: I might have strings that are UTF-8, and I might have
I have a problem with utf-8 encoding in primefaces 3. but with this (adding
I have a litle problem with my text encoding, when user filed textarea field
I am experiencing some problem on UTF-8 Encoding. I have a CSV file and
I have problem with repopulating form_upload after validation. Other input fields or selectboxes are
I have an ASP Access database that contains strings in various European languages. The
Programming language: Java Task: designing a hash function that maps Chinese Strings to numbers
I have a problem involving encoding/decoding. I read text from file and compare it

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.