I am fetching a Japanese string from Oracle Database and displaying it on the browser. But the characters are shown on the browser like ???. Inserted the Japanese string into DB using the unistr() function.
INSERT INTO MESSAGES (MESSAGE_ID,MESSAGE) VALUES (1,unistr('\0041\0063\0063\0065\0073\0073\0020\004d\0061\006e\0061\0067\0065\006d\0065\006e'));
I got this in my jvm logs ISO8859-1 when I printed System.getProperty("file.encoding").
select * from v$nls_parameters where parameter in ('NLS_CHARACTERSET') yields UTF8 in my DB.
Any pointers on how the Japanese characters could be displayed correctly ?
you are try to change the ISO8859-1 into utf-8.
if above issue in struts use this code on your java.jsp page
<%@ page language="java" contentType="text/html; charset=utf-8"
pageEncoding="utf-8"%>
Try changing your browser locale. You can do it with Firefox.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With