Answer the question
In order to leave comments, you need to log in
Postgres hieroglyphs instead of cyrillic?
I write the client's data to the database. The database is encoded in UTF-8, on the HTML pages the meta is UTF-8, but hieroglyphs are still written?
Answer the question
In order to leave comments, you need to log in
syuzyov did everything as you said, but it did not help, but still thank you very much.
Found this solution if anyone needs it:
try {
customername = new String(request.getParameter("customername").getBytes("ISO-8859-1"), "UTF-8");
customerlastname = new String(request.getParameter("customerlastname").getBytes("ISO-8859-1"),"UTF-8");
} catch(Exception e) { //this generic but you can control another types of exception
// look the origin of excption
}
Somehow, there is not enough information at all .... Based on the results of telepathy, the following is recommended:
1. Check for the presence of the Russian locale and install if necessary. Example for debian:
sudo dpkg-reconfigure -plow locales
We find the locale ru_RU.UTF-8 in the list, mark and complete the configuration.
2. Next, when initializing the instance, you must specify encoding and locale. Example for pgpro10:
pg-setup initdb --encoding=UTF8 --locale=ru_RU.UTF-8
In the future, describe the environment right away, please.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question