Good day. There is one small bug with the encoding of some Russian characters, namely with the letters "c", "I" (so far only they were noticed).

The fact is that when registering, the user specifies the first and last name, these parameters are transmitted via ajax to the java servlet that writes these data to the database, and the result is such krakozyabry: Pet ? Ivanov

Encoding everywhere (when sending a request to the contenttype, in the meta tag of the html page) is utf-8. I can not understand the reason.

  • you would at least specify the postgresql version. - huffman
  • 9.3. The base was created with utf-8 encoding - kidar2
  • which jdbc driver? url connection to the database? - huffman
  • I am using the PGPoolingDataSource from the postgresql-9.2-1003.jdbc4.jar library - kidar2
  • do you understand? - user18150

1 answer 1

I recommend to get acquainted with the documentation, in particular with section 22.3. Character Set Support Check with what encoding initdb database was initiated Check again with what parameters createdb created database

It may be necessary to force the encoding in the URL to connect to the database. jdbc: postgresql: //127.0.0.1: 5432 / < database name >? charSet = UTF8

  • 1. charSet makes sense to versions 7.3 2. sudo -u postgres createdb -E UTF8 -T template0 --lc-collate = en_RU.UTF-8 --lc-ctype = en_RU.UTF-8 topology_store - user18150