T
T
Timofey Lanevich2018-10-19 12:31:01
MySQL
Timofey Lanevich, 2018-10-19 12:31:01

Cyrillic in the database after sending a request from the application?

Hello.

There is a form to write down the name of the machine and its year.
5bc9a2add90a6411534742.png

When it is sent to the database, it is sent as Cyrillic.
If you create a query from the database itself, then everything works fine (the photo shows a normal result).
5bc9a2d1146c4825840626.png

I was looking for a solution, basically they say to change the encoding in the database, but there I have UTF-8 everywhere (utf8-general-ci in the database itself).

I also saw one on the forum to change the url in hibernate.cfg.xml, but the development environment says that it is impossible as it was written.
5bc9a41e66e4c358205075.png

Link to the project.

Thanks for the help!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
T
Timofey Lanevich, 2018-10-19
@Timak31

Found the answer , the problem with the encoding on the Tomcat server.
Tomcat uses ISO-8859-1 encoding by default.
Accordingly, convert from it to the one you need and that's it.
example:
Thank you all for your help!

I
Ivan Shumov, 2018-10-19
@inoise

in a sheaf "the coding of the entering data - the coding of a script - the coding of connection with a DB - the coding of the data in the table" not UTF crept somewhere. Every step needs to be checked.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question