Java Spring Frontend deployed on server do not show central european letters with diacritic

Hi, I have Java Spring backend with frontend. When running on localhost the web page shows every letter. After deploying on railway server, the fronend web page shows � symbol on place of all central europen letters with diacritics.... Can somebody help ?
Solution:
Stack Overflow
Wrong encoding between Spring and PostgreSQL
I have a Spring Boot (version 1.3) Web application, all in UTF-8, and a PostgreSQL server with server encoding UTF-8 and client encoding WIN1252. The problem is that when I save in the DB somethin...
Jump to solution
10 Replies
Percy
Percy17mo ago
Please provide your project ID or reply with N/A. Thread will automatically be closed if no reply is received within 10 minutes. You can copy your project's id by pressing Ctrl/Cmd + K -> Copy Project ID.
Percy
Percy17mo ago
No project ID was provided. Closing thread.
Brody
Brody17mo ago
make sure your files are encoded and served with utf-8 encoding
luckylukeSVK
luckylukeSVKOP17mo ago
ok, i did find problem randomly the problem was in postgres database, i was initializiing data in database via sql queries, my local postgres Db accepted central eurpean symblols. but postgres databaase on railway server does not accept centra european symbols. @Percy btw. dont you know, how change settings of postgres DB on railwas server to acceptd central european symbls ?
Brody
Brody17mo ago
just encode the text with utf-8?
luckylukeSVK
luckylukeSVKOP17mo ago
encode where ? in html file ? i have symbols � directly in database
Brody
Brody17mo ago
you would have had to save the text as utf-8 into the database
luckylukeSVK
luckylukeSVKOP17mo ago
did set the database to utf-8. im building tables automatically via hibernate, and filling tables with data via Spring data.sql file but it still show that "?" symbls i did copied queries of hybernate and from data.sql and runned them directli in the administration of postgres Db on the page of railway and there it worked fine it is interesting solution is:
Solution
luckylukeSVK
luckylukeSVK17mo ago
Stack Overflow
Wrong encoding between Spring and PostgreSQL
I have a Spring Boot (version 1.3) Web application, all in UTF-8, and a PostgreSQL server with server encoding UTF-8 and client encoding WIN1252. The problem is that when I save in the DB somethin...
Brody
Brody17mo ago
there ya go, I'm not familiar with spring but I knew the problem so that must count for something lol I'm glad you where able to find the solution!
Want results from more Discord servers?
Add your server