I am having an issue with HTML textarea in jsp form. The string(.....) got passed from jsp form(using javascript call) to WebLogic action correctly. However, when it is saved in Oracle, it turns into question mark (?????). This problem only happens in IE, Chrome works fine.
I think it has to do with the encoding. I need some suggestions to fix this problem.
Thanks in advance!
I have tried the followings but the problem is still there:
- modify weblogic.xml
<charset-params>
<input-charset>
<resource-path>/*</resource-path>
<java-charset-name>UTF-8</java-charset-name>
</input-charset>
</charset-params>
- change startWebLogic.cmd
-Dfile.encoding=UTF-8 -Doracle.jdbc.defaultNChar=true
- update connection string in WebLogic server
useUnicode=true&characterEncoding=UTF-8
Update:
current code
$('.myid').on('keyup change', function(){
$.post('action.do', {idx: $(this).attr('id'), notes: $(this).val(),
rand: Math.random()}, function( resp ){
if ( resp == null || resp.indexOf("success") == -1 ) {
alert("Failed to save notes!");
}
})
})
here is action.do
request.setCharacterEncoding("UTF-8");
// save notes with right content from user's input (...............)
// however after refreshing the page, notes turn into ???????
response.setContentType("text/html;charset=UTF-8");
PrintWriter out = response.getWriter();
try {
out.println( message );
} finally {
out.flush();
out.close();
}
Oracle: Would this be a problem?
NLS_CHARACTERSET US7ASCII
Thanks
question from:
https://stackoverflow.com/questions/65910656/special-character-dot-in-internet-explorer-not-saving-correctly-in-weblogic-an 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…