I'm having a problem with saved data in my PostgreSQL DB. The symbols for the VARCHAR columns are unreadable. I've researched it a lot and can't seem to find a solution to my problem.
Here's what I see:
2. DB creation query:
CREATE DATABASE test
WITH
OWNER = random
ENCODING = 'UTF8'
LC_COLLATE = 'English_United Kingdom.1252'
LC_CTYPE = 'English_United Kingdom.1252'
TABLESPACE = pg_default
CONNECTION LIMIT = -1;
3. Win 10 version - Microsoft Windows [Version 10.0.19041.685]
4. PostgreSQL 12.4
I don't think it's the cmd or PowerShell, because the characters are all scrambled in the pgAdmin4 as well, when I run a query to see records from the table. Ex. pgAdmin4 view
I tried chcp 65001. I tried SET PGCLIENTENCODING = 'UTF8' as well.
If you need more info, please let me know. Thank you.
UPDATE: To generate the data for the 3 columns, I use org.apache.commons.lang3.RandomStringUtils.random(6). I've tried it now with org.apache.commons.lang3.RandomStringUtils.randomAlphabetic(6) and it seems to work fine.
