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

The Archive Base Latest Questions

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

I have big problem in my web application using JSF and EclipseLink JPA to

  • 0

I have big problem in my web application using JSF and EclipseLink JPA to MySQL database.

When I read data from database JSF reads and writes my charachters in UTF-8 OK. but in database characters are bad.

f.e.: input characters: “żźćółzxcv”, written in database: “?????zxcv”.
But if I manually write data to database, for example: “żźćółzxcv”, then reading in JSF is perfect.

I tried everything from here: Unicode input retrieved via PrimeFaces input components become corrupted

And I discovered that encoding in JSF is fine, but the problem is in java, becouse if I set manually

current.setUwagiZ("żźćóżźćłąśóżźćł TE");
getFacade().edit(current);

in database record is wrong: ???ó??????ó???? TE

I have set characterEncoding and useUnicode in JDBC Resource. Also when execute commands by some tools in NetBeans encoding is OK and data in MySQL are in UTF-8, so connections seems fine.

So the problem is java, but I completely don’t know how to solve this 🙁

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

    Question marks can occur when the messenger itself is aware about the character encoding used in the both sides of the transport. That’s the difference with Mojibake whereby it’s not the messenger’s fault, but the producer’s and/or consumer’s fault.

    In an average web application with a database backend, there are only 2 places where this can happen: communication with the DB and communication with the HTTP client. You’ve already excluded the HTTP part, so left behind the DB part.

    The messenger in the DB part is the JDBC driver. You need to tell the JDBC driver to use UTF-8. MySQL JDBC driver is known to use by default the client platform default encoding, which is in your particular case apparently not UTF-8.

    Add the following 2 properties to the JDBC connection:

    • useUnicode=true
    • characterEncoding=UTF-8

    It’s unclear how you’ve configured the JDBC connection, but if it’s "plain vanilla" JDBC, then specify them as query string in JDBC URL:

    jdbc:mysql://localhost:3306/db_name?useUnicode=true&characterEncoding=UTF-8
    

    Or if it’s a container-specific datasource config, then specify them as separate connection properties, exactly the same way as you specify the username and password.

    See also:

    • Unicode – How to get the characters right?
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using editor from Kendo UI, so I have big problem. I don't know
I have a pretty big web application that I created last year using ASP.NET
We have a web application that has been built using MySQL / PHP /
Recently I have been working on upgrading a big web application that was using
I have a big problem. I want to extract text from html table that
I have a big problem dealing with data I try to download in my
we are making an web application using some big asp.net web toolkit. At the
We have a web application that runs on IIS using .NET 2.0 developed and
I'm developing a web application using .net/c#. I have a user control that I
I have a web application with a big order form: 300+ input fields for

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.