MySQL Db Question Marks Instead of Hebrew Characters..

Getting question marks when inserting Hebrew characters into a MySQL table

You need to tell the JDBC driver to use UTF-8 encoding while decoding the characters representing the SQL query to bytes. You can do that by adding useUnicode=yes and characterEncoding=UTF-8 query parameters to the JDBC connection URL.

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

It will otherwise use the operating system platform default charset. The MySQL JDBC driver is itself well aware about the encoding used in both the client side (where the JDBC code runs) and the server side (where the DB table is). Any character which is not covered by the charset used by the DB table will be replaced by a question mark.

See also:

  • Spring Encoding with CharacterEncodingFilter in web.xml

Database is showing hebrew, but in php the hebrew data is showing as question marks

Check your character encoding is consistently UTF-8 everywhere.

  • Check the DB is utf-8
  • Check the table is utf-8
  • check the column is utf-8
  • check the html meta tag charset is utf-8
  • check in your IDE or text editor that the PHP file is utf-8.

from c# server to mysql DB - hebrew question marks

After changing both the collation and the web.config as described, the only thing that I didn't change was the procedures in the DB.
So, after changing from this:

pCategoryDescH varchar(300)

to this:

pCategoryDescH nvarchar(300)

finally it worked.

The solution was found here



Related Topics



Leave a reply



Submit