Character encoding problem Using Java 1.4.2 and Mysql 5.0



Hi All,

I am facing a problem for Character encoding that just made me crazy.
Our user's copies text from different sites and pasting it .

I m using jboss 3.2.3 and embedded tomcat 4.1.29 and MySql 5.0 as
backend.

I have used a filter that set character encoding like this

request.setCharacterEncoding("Cp1252");

and our jsp contains the tag :
<%@ page contentType="text/html; charset=windows-1252"
language="java"%>
<%@ page pageEncoding="windows-1252"%>

I am using jboss manage connection and mysql-ds.xml setting for mysql
is as follows:

jdbc:mysql://10.1.1.48:3306/mydb?useUnicode
=true&amp;characterEncoding=cp1252&amp;characterSetResults=cp1252

If debug the application just before insertion every thing is fine but
if iretrieve the content its weired and produce ? for some characters
like

"left angled double quote", "right angled double quote" etc..

Thanks in advance..

Regards
Dhananjay

.



Relevant Pages

  • Character encoding problem using java and MySql 5.0
    ... I am facing a problem for Character encoding that just made me crazy. ... Our user's copies text from different sites and pasting it. ... I am using jboss manage connection and mysql-ds.xml setting for mysql ...
    (comp.lang.java.programmer)
  • Re: Strange characters... how are they created?
    ... That's an interesting operation, but nay, no directional change. ... pasting it into IRB causes my machine to beep and pause. ...
    (comp.lang.ruby)