-1

I'm creating a new app that is connected to a local host MYSQL database (for now) and the app users will enter the data in Arabic language. The problem is that when I insert the data by using java the field in database show me this "?????????" in the main time when I insert the data directly from phpmyadmin it works.

I found on the internet two steps

  1. is to set the Collation to utf8_general_ci and i have already did that
  2. there are two sentences that should be written within the java code i don't know what they are and how use them they might be the solution. enter image description here
2
  • 3
    Please post the code as text not as an image. Commented Sep 8, 2019 at 6:13
  • 1
    I won't mark as a duplicate (yet), but this SO answer may very well be the solution to your problem. You need to open a UTF-8 compatible connection to MySQL from your Java application. Otherwise, some other encoding would be used by default (probably not UTF-8). Commented Sep 8, 2019 at 6:13

1 Answer 1

1

I think this question answered here:

How can I insert arabic word to mysql database using java

and you can review below answer for more clarification:

Save Data in Arabic in MySQL database

Note: both links are for Stackoverflow questions.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.