tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Frank Morton" <fmor...@base2inc.com>
Subject Re: Greek encoding in Java Servlet Output
Date Fri, 01 Jun 2001 14:11:20 GMT
Is your "out" in the example below a ServletOutputStream or
a PrintWriter?

> We are experiencing similar problems. We are using an Oracle database in
the
> UTF8 charset and were accessing thru JDBC thin with nlscharset classes.
>
>     DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
>     connection =
>
DriverManager.getConnection("jdbc:oracle:thin:@server:1521:TEST",username,pa
> sswd);
>
> However we had problems with various characters so we changed to the thick
> driver
>
>     Enumeration e = DriverManager.getDrivers();
>     Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
>     Connection connection =
> DriverManager.getConnection("jdbc:odbc:TPSO",username,passwd);
>
> and also added the following lines in the servlet.
>
>   response.setContentType("text/html;charset=UTF-8");
>   out.println("<meta http-equiv=\"Content-Type\"
> content=\"text/html;charset=UTF-8\">");
>
> This is however only tested for IE5.5.
>
>
> Ian
>


Mime
View raw message