[opencms-dev] Request character encoding - An answer with a n ew Q

Vlachogiannis Evangelos evlach at aegean.gr
Fri May 28 02:43:01 CEST 2004


Replying to my q I used the following : 

<%@ page language="java" contentType="text/html; charset=ISO-8859-7"
pageEncoding="ISO-8859-7" %>
<%@ page import="java.util.*"%>
<%
out.println( "<BODY BGCOLOR=\"#FDF5E6\">\n" +
                "<H1 ALIGN=CENTER>" + ""+ "</H1>\n" +
                "<B>Request Method: </B>" +
                request.getMethod() + "<BR>\n" +
                "<B>Request URI: </B>" +
                request.getRequestURI() + "<BR>\n" +
                "<B>Request Protocol: </B>" +
                request.getProtocol() + "<BR><BR>\n" +
                "<TABLE BORDER=1 ALIGN=CENTER>\n" +
                "<TR BGCOLOR=\"#FFAD00\">\n" +
                "<TH>Header Name<TH>Header Value");
    Enumeration headerNames = request.getHeaderNames();
    while(headerNames.hasMoreElements()) {
      String headerName = (String)headerNames.nextElement();
      out.println("<TR><TD>" + headerName);
      out.println("    <TD>" + request.getHeader(headerName));
    }
    out.println("</TABLE>\n</BODY></HTML>");
out.println(response.getCharacterEncoding());
out.println(request.getCharacterEncoding());
  String pagetitle = new
String(request.getParameter("pagetitle").getBytes("Cp1252"),"ISO-8859-7");
out.println(pagetitle );
%>

having config tomcat/opencms to ISO-8859-7.
 
My operating system (winxp) uses "Cp1252" that's why it is working like
this. But my question is how can I know what encoding the client uses. I
cannot see being able to retrieve this from request headers. Any ideas
please?

Please correct me if I am wrong request encoding is depends on tomcat
encoding (??).

Thnx,
Vangelis

-----Original Message-----
From: Vlachogiannis Evangelos [mailto:evlach at aegean.gr] 
Sent: Friday, May 28, 2004 3:02 AM
To: 'opencms-dev at opencms.org'
Subject: [opencms-dev] Request character encoding

Hi alll,
Could you please let me know which is the default opencms request character
encoding and if this is configurable?

Thnx,
Vangelis
_______________________________________________
This mail is send to you from the opencms-dev mailing list To change your
list options, or to unsubscribe from the list, please visit
http://mail.opencms.org/mailman/listinfo/opencms-dev



More information about the opencms-dev mailing list