Page displaying '?', Instead of 'é'

I am extracting data from oracle11g and displaying data in IE8 and IE9 browser but cannot display some special characters (e.g. é)

On my webpage, I explicitly declare the encoding "UTF-8".

For my tomcat web server, server.xml

<Connector port="8080" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" URIEncoding="UTF-8" useBodyEncodingForURI="true"/> 

I read some other questions on the stack thread, they also mentioned that the database connection also used "UTF-8".

  <Resource name="jdbc/AppDB" auth="Container" type="javax.sql.DataSource" maxActive="20" maxIdle="10" maxWait="10000" username="foo" password="bar" driverClassName="com.mysql.jdbc.Driver" url="jdbc:mysql://localhost:3306/ ID_development?useEncoding=true&amp;characterEncoding=UTF-8" /> 

The solution is set for mysql. How to set encoding if im uses oracleDriver?

 <Resource name="jdbc/AppDB" auth="Container" type="javax.sql.DataSource" driverClassName="oracle.jdbc.OracleDriver" url="jdbc:oracle:thin:@127.0.0.1:1521:ora11" username="foo" password="bar" maxActive="20" maxIdle="1000" maxWait="-1" /> 
0
source share
1 answer

Check out this answer . Regardless of its focus on SQL Developer, it contains information on setting up the JDBC driver and indicates how to correctly handle Unicode character types in Oracle.

Update
Failure to display characters on the client can be caused by incorrect NLS_LANG settings for the database client (Tomcat in your case). For the thin JDBC driver NLS_LANG obtained from the java language system settings.
For options, you can review the answers to this question and check the Oracle documentation .
If the real source of the problem lies in the character set of the Oracle database, then there are only two possible endpoints: NLS_LANG and oracle.jdbc.defaultNChar . So you need to check if both parameters are set correctly to find out what happened.

+1
source

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


All Articles