A
A
anasteisham2021-05-12 17:21:11
PostgreSQL
anasteisham, 2021-05-12 17:21:11

Everywhere encoding is UTF-8, but are bugs written in Postgresql?

If you manually record data, everything is fine, but if through the created site, then bugs are written to the database.

CREATE DATABASE customs
    WITH 
    OWNER = postgres
    ENCODING = 'UTF8'
    LC_COLLATE = 'Russian_Russia.1251'
    LC_CTYPE = 'Russian_Russia.1251'
    TABLESPACE = pg_default
    CONNECTION LIMIT = -1;


In every JSP

<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8"%>


I still get this data: ааа

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vasily Bannikov, 2021-05-12
@vabka

LC_COLLATE = 'Russian_Russia.1251'
LC_CTYPE = 'Russian_Russia.1251'

Try writing RU_ru.utf-8

K
Konstantin, 2021-05-12
@kot999

Far from Java, but you specify LC_CTYPE and LC_COLLATE = 1251 instead of UTF8.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question