0

My question is about related to MySQL database.

Can any one help me to store a non English string from java application to MySQL database?

I tried in several ways. I changed the collisions of the database columns too. But when passed a non English string to the MySQL database, it shows a "???" mark in the table. Why is this happening?

When passed a English string, that is working fine. But when sending a non English string from the java application, that stores that non English string as a "?" mark on the database.

Can any one help me to resolve this issue?

2

2 Answers 2

0

yu need t change table collection to utf8_genereal_ci or any of this utf8 collection, also in columt data type to string r long string

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

3 Comments

I have already used the collasions that you have mentioned. But I used varchar as the datatype of the column. So, will datatype "varchar" affect ?
i ve never used as varchar but as string and longstring and spanish character are welcome like this ñ or this á
Ok. I will try and will let you know the progress. Btw, thanks a lot for your big help.
0

Please use UTF8 or UTF8MB4 as character set of the MySQL and chactersetEncoding as utf8 in case you are using JDBC connection from Java Application.

3 Comments

Hi, I tried with most of the collasions like above mentioned. But no luck. :(
Have you tried charactersetEncoding in JDBC connection?
Can you please show me how to set chactersetEncoding as utf8 ? Please. It would be big help for me.

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.