aspose file tools*
The moose likes Tomcat and the fly likes defaulf encoding problems Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "defaulf encoding problems" Watch "defaulf encoding problems" New topic
Author

defaulf encoding problems

Apirak Panatkool
Greenhorn

Joined: Apr 30, 2002
Posts: 15
my old server is redhat 7.1 + tomcat 4.0 + mysql
I fix my problems by
1. add LANG=th_TH to catalina and
2. add <%@ page contentType="text/html; charset=TIS620" %> to my jsp page
This can solve my problems.... but!!
my new server is redhar 7.3 + tomcat 4.1.10 + mysql
I can't use my old code... it display "???" with any data that download from mysql database(I try to display it on console "System.out.println(x)" it show the correct encoding.)
I fix my new problems by delete <%@ page contentType="text/html; charset=TIS620" %>" but it have new problem!!! user should change his encoding every time (IEMenu->view->encoding->Thai)
How to set default to Thai?
or I should fix my problem by other way?
Thank you.
ps. I already have "<meta http-equiv="Content-Type" content="text/html; charset=windows-874">" in my code.
--------------------
bAnk


bAnk
Apirak Panatkool
Greenhorn

Joined: Apr 30, 2002
Posts: 15
mycode:
<%@ page import="messages.*" %>
<%@ page import="java.util.*" %>
<%@ page contentType="text/html; charset=TIS620" %>
<html>
<head>
<title>Home :: PeTerPan</title>
<meta http-equiv="Content-Type" content="text/html; charset=windows-874">
</head>
<body bgcolor="#FFFFFF" >
แสดง <%=messages.getValue("1")%>
<% System.out.println(comm.getValue("1")); %>
</body>
</html>
browser result:
แสดง ???
console result:
แสดง ทดสอบภาษา
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: defaulf encoding problems
 
Similar Threads
default encoding problems
content type overides my encoding
jsp include - utf-8 encoding problem
Encoding On Browser Problems
cannot use utf-8 to store utf-8 character, please help