-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
seenukarthi
  • 8,241
  • 10
  • 47
  • 68
  • 3
    Please post the code as text not as an image. – seenukarthi Sep 08 '19 at 06:13
  • 1
    I won't mark as a duplicate (yet), but [this SO answer](https://stackoverflow.com/questions/3275524/java-mysql-utf8-problem) 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). – Tim Biegeleisen Sep 08 '19 at 06:13

1 Answers1

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.

burg.developer
  • 378
  • 1
  • 12