Problem reading arabic on jsp page?

I have a column in a PostgreSQL database that contains Arabic data. When reading data from the database in the controller, it was well read, the encoding is good, but by sending data to the JSP page and trying to read it, they look like something like ?????????. Any ideas why something like this is happening?

+3
source share
2 answers

You need to set the encoding of the HTTP response. If you use JSP as a viewing technology, you need to add the following line to the top of the JSP:

<%@ page pageEncoding="UTF-8" %>

servletcontainer , charset HTTP Content-Type, - , .

. : Unicode - ? JSP/Servlet .

+3

, jsp UTF8 Oracle 10g, SQL Server, UTF8.

+1

Source: https://habr.com/ru/post/1746146/


All Articles