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:Jump to solution
set this: spring.sql.init.encoding = UTF-8
source: https://stackoverflow.com/questions/36222213/wrong-encoding-between-spring-and-postgresql...
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...
10 Replies
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.No project ID was provided. Closing thread.
make sure your files are encoded and served with utf-8 encoding
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 ?
just encode the text with utf-8?
encode where ? in html file ?
i have symbols � directly in database
you would have had to save the text as utf-8 into the database
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
set this: spring.sql.init.encoding = UTF-8
source: https://stackoverflow.com/questions/36222213/wrong-encoding-between-spring-and-postgresql
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...
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!